about | help | code help+videos | done | prefs |
Write a method that returns the sum of the two integer input parameters, with the following exceptions: #1 if the sum is negative, subtract 10 from the total. So -3 and -5 would result in -18 (since they sum to -8, but then you have to subtract 10 because the sum was negative). #2 if the sum is exactly 5, you must return 5000 instead! Please look at the test data carefully to make sure you understand the directions. aaa1funnySum(5, 6) → 11 aaa1funnySum(-3, -2) → -15 aaa1funnySum(-6, 1) → -15 ...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: 210
Copyright Nick Parlante 2017 - privacy