Working variables
(Display Listing 7.)
The program declares and initializes the following working variables that are used in
the algorithm:
- grade - Used to capture input grade value from user.
Initial value is immaterial.
- sum - Used to compute the sum of all the grade values.
Initial value of zero is critical to the success of the program.
- count - Used to keep track of the number of grades entered.
Initial value of zero is critical to the success of the program.
- avg - Used to store the average computed as the sum divided by
the count. Initial value is immaterial.