about | help | code help+videos | done | prefs |
Write a method that returns the sum of the two integer parameters. However, if the two numbers do not have the same value, the largest number gets doubled. For example, if the two numbers are 5 and 8, the value returned would be 21 since the 8 would get doubled to 16 then 5 is added to that to get 21. nov9_2016_APSLHL_sumNumsDoubleGreater(4, 4) → 8 nov9_2016_APSLHL_sumNumsDoubleGreater(7, 2) → 16 nov9_2016_APSLHL_sumNumsDoubleGreater(9, 10) → 29 ...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: 250
Copyright Nick Parlante 2017 - privacy