about | help | code help+videos | done | prefs |
Write a method that accepts three boolean and three integer parameters. The boolean parameters indicate if the following integer parameter is supposed to be included in the sum or not. For example, if the method is called with this parameter list: (true, 20, false, 17, true 5) it means that 20 and 5 are supposed to be included in the sum, but 17 is not. So the method would return 25. Look at the test data for further examples. quiz2020_09_21_P1SLHL_includeSum(true, 250, true, 742, false, 45) → 992 quiz2020_09_21_P1SLHL_includeSum(false, 9280, true, 321, false, 325) → 321 quiz2020_09_21_P1SLHL_includeSum(true, 22350, true, 1243, false, -2545) → 23593 ...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: 230
Copyright Nick Parlante 2017 - privacy