Ã88
Fully Optimized
- Messages
- 4,775
Alright so this should be simple for someone who knows how to program C++ good. I have made a program for my intro to C++ class but I can't seem to debug it. The problem lies with the declared variables. The program takes user inputed numbers and finds the average. When they hit zero, the average is printed on the screen then it asks if the user would like to restart and find the average of some new numbers. It basically has two loop statements in the program but I have to use the variable for the average twice but the second time it is used must be independent from the first time(because of course when i output the average for the second, third, fourth etc set of numbers it will always display the first average that was found. How would I make it so the average will calculate differently for each new set of numbers?