I having a problem to key in marks 0-9 in order to get grades F, what's wrong with my program? Hope you all can tell me, I cannot think of it. Thank you.
//This program uses a switch-case statement to assign a
//letter grade(A,B,C,D,or F)to a numeric test score.
#include<iostream>
using namespace std;
int main()
{
int testScore;
cout<<"Enter your test score and I will tell you\n";
cout<<"the letter grade you earned:";
cin>>testScore;
switch(testScore)
{
case 0 :
case 1 :
case 2 :
case 3 :
case 4 :
case 5 :
cout<<"grade=F.\n";
break;
case 6 :
cout<<"grade=D.\n";
break;
case 7 :
cout<<"grade=C.\n";
break;
case 8 :
cout<<"grade=B.\n";
break;
case 9 :
case 10:
cout<<"grade=A.\n";
break;
default:
cout<<"That score isn't valid.\n";
}
system ("pause");
return 0;
}