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

 

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

Write a method that returns the "running total" of the numbers in the array 'nums'. However, do NOT count any occurrences of the number 'exclude'. Look at the test data for examples. Note that the array may have any number of integers in it.


mar5_2020_P1SLHL_runningTotal([5, 24, 436, 421, 634, 1], 436) → [5, 29, 29, 450, 1084, 1085]
mar5_2020_P1SLHL_runningTotal([], 5) → []
mar5_2020_P1SLHL_runningTotal([-7, -4, 5, 12, 525], 56) → [-7, -11, -6, 6, 531]

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

public int[] mar5_2020_P1SLHL_runningTotal(int[] nums, int exclude) { }

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: 290

Copyright Nick Parlante 2017 - privacy