about | help | code help+videos | done | prefs |
Write a method that has two integer parameters, a and b; followed by a boolean parameter dbl. The method returns the sum of a and b, unless dbl is true; then b counts double so it returns the sum of a+2b in that case. sumDoubleMaybe(18, 30, true) → 78 sumDoubleMaybe(18, 30, false) → 48 sumDoubleMaybe(-90, -3, false) → -93 ...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: 150
Copyright Nick Parlante 2017 - privacy