about | help | code help+videos | done | prefs |
Write a method that performs the indicated 'operation' on two integers 'num1' and 'num2'. Valid operations are "+", "-", "*", and "/". As a precondition you may assume that 'operation' will be one of these operations and that if the operation is "/" 'num2' will not be zero. Also, the division operation will result in integer division because the method returns an integer. Look at the test data for examples. dec15_2016_APSLHL_calculate(325, "/", 5) → 65 dec15_2016_APSLHL_calculate(70, "*", 2) → 140 dec15_2016_APSLHL_calculate(1, "*", 1) → 1 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 210
Copyright Nick Parlante 2017 - privacy