Question
Introduction to C++ Concepts: For and While Loops A teacher wants to compute the results of a series of quizzes for her class. The quizzes
Introduction to C++
Concepts: For and While Loops
A teacher wants to compute the results of a series of quizzes for her class. The quizzes are organized by student (all of each student's quiz papers are grouped together). The teacher knows how many quizzes were presented, but does not know how many students took those quizzes. However, the teacher knows that there is at least one student in her class, and that every student has taken at least one quiz (you should be thinking "do loop").
Write a program that will: A. Ask for each student's first name. Run through a loop collecting quiz score data for each student. The quizzes must have a grade of 0 through 10 (whole points only). The user should enter all the quizzes for one student, before moving on to the next student.
B. When the teacher runs out of papers (the last student has had all his quizzes entered), the loop ends. You can decide for yourself how to do this, just be sure to inform the user. The program should then display the average grade (to one decimal place) for each student, and the high and low score for each of the quizzes, and the class average grade for all quizzes.
Make the output look something like this: Enter first student name: Joey Enter Joey's first score: 10 Enter score (-1 to end): 10 Enter score (-1 to end): 10 Enter score (-1 to end): -1 Joey earned 30 points out of 30 for a score of 100 percent Joey's high quiz was 10, and low quiz was 10
Enter next student name (-1 to end): Suzie-Q Enter Suzie-Q's first score: 9 Enter score (-1 to end): 10 Enter score (-1 to end): -1 Suzie-Q earned 19 points out of 20 for a score of 95 percent Suzie-Q's high quiz was 10, and low quiz was 9
Enter next student name (-1 to end): Brainerd Enter Brainerd's first score: 4 Enter score (-1 to end): 3 Enter score (-1 to end): 5 Enter score (-1 to end): 2 Enter score (-1 to end): -1 Brainerd earned 14 points out of 40 for a score of 35 percent Brainerd's high quiz was 5, and low quiz was 2
Enter next student name (-1 to end): -1 The whole class earned 63 points out of 90 for a score of 70 percent
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