Question
Update your student grade calculator program. 1. Build and present a menu to a user like the following and enclose it into a loop that
Update your student grade calculator program.
1. Build and present a menu to a user like the following and enclose it into a loop that ends when the Quit option is chosen.Scan the user's selection into an integer variable.
1. Enter user name. 2. Enter exam scores. 3. Display average. 4. Display summary. 5. Quit. Selection:
2.If the user selects Option #1,scan the user's name, and store it to a char array.Assume the user's name is under 20 characters.
3. If the user selects Option #2, use a for-loop to scan 3 exam scores into a float array.Calculate the average and store the result in a float variable. Assume all scores are out of 100 points.
4. If the user selects Option #3, Display the average of the exam scores. If the user has not yet entered exam scores, display an error message similar to: "Please use the menu to enter exam scores first"
Hint:Use boolean values to keep track of the options that have been selected.
5.If the user selects Option #4, display the average, the letter grade of the average, and the user's name. If the user has not yet entered their name or exam scores, display an error message.
- Example: "Hello Charley, your exam scores were 80, 90, and 100. Your average is 90.0 with letter grade: A."
- Example: "Please use the menu to enter your name first."
- Example: "Please use the menu to enter your exam scores first."
6. When the Quit option is chosen, end the primary loop that contains the menu.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started