Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include #include using namespace std; int main() { cout // Your code goes here } Write a program that prompts the user to enter the
#include
#include
using namespace std;
int main()
{
cout
// Your code goes here
}
Write a program that prompts the user to enter the number of grades they would like to average. Your program should then prompt the user for each grade inside of a loop, and input each grade into a float. Within your loop you should add each grade to a sum. Then, after your loop, output the average of all the grades the user entered by dividing the sum you computed in the loop by the number of grades. Below are some sample runs of the program. User input is in bold italics. Sample run 1 Enter number of grades: 4 Enter grade number 1: 87 Enter grade number 2: 9e.5 Enter grade number 3: 82.5 Enter grade number 4: 86 The average is: 86.5 Sample run 2 Enter number of grades: 10 Enter grade number 1: 9e Enter grade number 2: 77 Enter grade number 3: 86 Enter grade number 4: 100 Enter grade number 5: 68 Enter grade number 6:48 Enter grade number 7: 92 Enter grade number 8: 77 Enter grade number 9: 100 Enter grade number 10: 88 The average is: 82.68 YOUR ANSWER We recommend you take a quick tour of our editor before you proceed. The timer will pause up to 90 seconds for the tour. Start tour For help on how to read input and write output in C++,click hereStep 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