about | help | code help+videos | done | prefs |
Write a method that returns the product of 'num1' and 'num2' unless 'add' is true (meaning that we want to add the numbers instead). If 'add' is true, return the sum of 'num1' and 'num2'. test2022_10_06_APP1SLHL_addOrMult(true, 15, 10) → 25 test2022_10_06_APP1SLHL_addOrMult(false, 3, 7) → 21 test2022_10_06_APP1SLHL_addOrMult(true, 3, 7) → 10 ...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