about | help | code help+videos | done | prefs |
Given two int values a and b and a boolean shouldMultiply, multiply the parameters if the third parameter has the value true, and return the result of the multiplication. If the third parameter has the value false, add the parameters instead and return the sum. apcsaPrimitivesMultiplyOrAddOperands1(2, 4, true) → 8 apcsaPrimitivesMultiplyOrAddOperands1(2, 4, false) → 6 apcsaPrimitivesMultiplyOrAddOperands1(-3, 4, true) → -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: 100 Post-solution available
Copyright Nick Parlante 2017 - privacy