Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ question: Briefly describe what input(s) will be needed to terminate the while-loop on line #24 under Linux? I // Fig.5.11: LetterGrades.cpp 2 // Using

C++ question:

Briefly describe what input(s) will be needed to terminate the while-loop on line #24 under Linux?

image text in transcribed

image text in transcribed

I // Fig.5.11: LetterGrades.cpp 2 // Using a switch statement to count letter grades 3 #include 4 #include 5 using namespace std; 6 7 int mainO int totaltoj; // sum of grades unsigned int gradeCounterfo; // number of grades entered unsigned int aCountto // count of A grades unsigned int bCountf0; // count of B grades unsigned int cCountt0 // count of Cgrades unsigned int dCountto // count of D grades unsigned int fCountto // count of Fgrades 8 10 12 15 cout d then press Enter n" > grade) 23 24 25 26 27 28 29 30 total +grade; // add grade to total ++gradeCounter; // increment number of grades increment appropriate letter-grade counter switch (grade/10) case 9: // grade was between 90 case 10:// and 100, inclusive ++aCount; break; // exits switch 32 34 35 36 37 38 39 40 41 case 8: // grade was between 80 and 89 ++bCount; break;// exits switch case 7: // grade was between 70 and 79 ++cCount; break: // exits switch 42 case 6: // grade was between 60 and 69 ++dCount; break; // exits switch 45 46 default:// grade was less than 60 48 49 50 ++fCount; break; // optional; exits switch anyway // end switch //end while 52 53 54 // set floating-point number format cout (total) / gradeCounter; 62 63 64 65 // output summary of results cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

5. Arranging for the training facility and room.

Answered: 1 week ago