about | help | code help+videos | done | prefs |
Write a method that accepts two integer parameters 'a' and 'b', and a boolean parameter 'add'. If 'add' is true, return the sum of the two integers, but otherwise return their difference. quizProg3P1(5, 7, true) → 12 quizProg3P1(14, 2, false) → 12 quizProg3P1(2048, 48, false) → 2000 ...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: 200
Copyright Nick Parlante 2017 - privacy