about | help | code help+videos | done | prefs |
Write a method that returns the sum of the two integers if the boolean variable add is true. Otherwise return the product of the two integers. strangeCalculator(5, 6, true) → 11 strangeCalculator(3, 4, true) → 7 strangeCalculator(3, 4, false) → 12 ...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: 220
Copyright Nick Parlante 2017 - privacy