#include using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** argv) { //目的:while(true)無窮迴圈,按n離開 int s1=0 ; char c1; while(true) { cout<<"\n please input your score = "; cin>>s1; int grade = s1/10; switch(grade) { case 10: cout<<"score "<>c1; if(c1=='N' || c1=='n')break; } return 0; }