i need to know how many times the while loop is done.
while (myin)
{
myin >> name;
cout << name ;
myin >> num1 >> num2 >> num3;
cout << " " << fixed << setprecision(0)<< num1 << " "<< num2 << " "<< num3 ;
average = (num1 + num2 + num3)/3;
cout << " " << fixed << setprecision(2)<< average ;
if ( average >= 90)
cout << " A";
else if( average > 80)
cout << " B";
else if( average > 70)
cout << " C";
else if( average > 60)
cout << " D";
else
cout << " F";
cout << endl;
}
i have multiple name and numbers so this repeats.
i want to know why last one is repeated?
also, i need to get an average of all of the averages, how can i do it?