Running Totals
Using a variable to keep a Running Total! Go Full Screen to see in greater detail?
|
Loops make it easy to create code quickly, but can produce problems when trying to add up a list of numbers entered inside the loop.
Here, we look at how a running total is often used when using a loop with numbers entered inside the loop having to be added up.
What you have to do!
- Watch which shows you the code to include Running Totals in your program.
- Click on the button to download the program folder Test_Average. Make sure you choose Save.
- Move the folder into your VB Programs folder.
- Right Click and choose Extract All or Extract Files. Click OK or Next and keep going until the process is Finished..
- Create the code for the program and check it works with various input values.
- Tick off your Progress Grids.
Mark off Exercise 15 in your progress grids.
What you should now be able to do!
-
Use a running total inside a loop