Assignment 5: Computing Averages
Write a program that computes the average of numbers. Specifically, the program should use a FOR loop, a REPEAT loop, and a WHILE loop to find the sum of numbers entered by the user, and then compute the average of those numbers. The program is due Monday, Oct. 30.
Your program must include the following
- Constants instead of actual data values
- Nowhere inside the program should you use raw data values. Instead, define appropriate constants in the declaration part of your program and use those in the program.
- Procedure ShowTheMenu
- This procedure should display a menu with the choices
[a] To compute average using FOR loop [b] To compute average using REPEAT loop [c] To compute average using WHILE loop [x] To eXit the program
Note that the actual letters 'a', 'b','c', and 'x' should not appear in a WRITELN statement. You should instead use the appropriate constants.
Please post any questions on the bulletin board, or send me electronic mail.
(bgw)