Question: Previous Assignment: #include #include using namespace std; int main( ) { int acount = 0, bcount = 0, ccount = 0, dcount = 0, fcount

Previous Assignment:

#include

#include

using namespace std;

int main( )

{

int acount = 0, bcount = 0, ccount = 0, dcount = 0, fcount = 0;

double score;

string name;

while(name!="//")

{

cout <<"Enter a name "<< endl;

cin>>name;

cout <<"Enter a score" << endl;

cin>>score;

if(score>=90.0)

{

acount = acount+1;

cout<

}

else if(score>=80.0)

{

bcount = bcount+1;

cout<

}

else if(score>=70.0)

{

ccount = ccount+1;

cout<

}

else if(score>=60.0)

{

dcount = dcount+1;

cout << name << "" <

}

else if(score>=0-59.0)

{

fcount = fcount+1;

cout << name << "" << score << "F" << endl;

}

}

cout << "Summary Report"<

cout << "Total Students count 5" <

cout << "A Student count " << acount <

cout << "B Student count " << bcount <

cout << "C Student count " << ccount <

cout << "D Student count " << dcount <

cout << "F Student count " << fcount <

}

Enahnce the previous assignment with the following additions:

When asked for name, the user should enter a full name (e.g. John Smith)

When asked for scores, the user should enter a score in the range of 0 to 100. If the user enters a score outside that range, the program should ask the user again to enter the score. The program should do that repeatedly until the user enters the score in the required range.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!