Running Step Count
mediumQuestion 95You have an array of steps walked on each of four days. Loop through the array using an index and print a line for each day showing the running total so far, in the form "Day 1: 1000". The running total should add up all the steps from the first day through the current day, so it keeps growing as you go.
Expected output
Day 1: 1000 Day 2: 3500 Day 3: 5000 Day 4: 8000
= newline. The output ends with a newline, so print one after the last line.
Hints3 available
Sign in to use hintsTopics
Loops
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.