about | help | code help+videos | done | prefs |
Write a method that returns the sum of two integer input parameters 'num1' and 'num2', but ONLY if 'num2' is greater than 'num1'. If 'num2' is equal to 'num1' or less than 'num1', just return the value of 'num1'. Look at the test data for examples. Remember, you must only use ONE return statement per method. practiceQuiz2021_08_30_APSLHL_maybeAdd(5, 6) → 11 practiceQuiz2021_08_30_APSLHL_maybeAdd(5, 3) → 5 practiceQuiz2021_08_30_APSLHL_maybeAdd(8, 10) → 18 ...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: 230
Copyright Nick Parlante 2017 - privacy