How would i reject invalid inputs in my code?

You can do like this:

do{
    cout <<"\t !!! All scores should range from 0.00 to 100.00!!! \n";
    cin >> exam_1;  
while(exam_1 < 0.0 || exam_1>100.0);

Repeat this to all inputs

Leave a Comment