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

 

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

Write a method with a string input parameter consisting of integers strung together with "+" and "-" signs. The only characters present in the string will be numeric digits and these two signs mentioned above. Return the integer result obtained by performing all of the indicated operations.


runningTotal("-655+241-825-492+2498") → 767
runningTotal("4+17+200+40+18+30-400") → -91
runningTotal("-14") → -14

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

public int runningTotal(String oprs) { }

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

Copyright Nick Parlante 2017 - privacy