id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > test2021_09_02_APSLHL_runningSum
prev  |  next  |  chance

Write a method that finds the sum of three integer parameters, except do not include the integer in the sum unless it is greater than the previous integer. For example, with parameter list (5,12,9) only the 5 and 12 are counted towards the sum. The 9 is not counted because it is not greater than the number that came before it. No matter what, the first number is included in the sum because there is no number that comes before it.


test2021_09_02_APSLHL_runningSum(5, 10, 30) → 45
test2021_09_02_APSLHL_runningSum(16, 20, 5) → 36
test2021_09_02_APSLHL_runningSum(19, 10, 2) → 19

...Save, Compile, Run (ctrl-enter)

public int test2021_09_02_APSLHL_runningSum(int num1, int num2, int num3) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 240

Copyright Nick Parlante 2017 - privacy