当输入55,+时输出score=85,为什么不是输出重新输入
题目是 5+ 5 5- 4+ 4 4- 3 2 1对应的分数制是100 95 90 85 80 75 70 60 <60 <60 #include <stdio.h> main() { char c1,c2; printf("input your score:"); c1=getchar(); getchar(); c2=getchar(); if(c1=='5') { if(c2=='+') printf("score=100"); else if(c2=='\n') printf("score=90"); else printf("score=85"); } else if(c1=='4') { if(c2=='+') printf("score=80"); else if(c2=='\n') printf("score=75"); else printf("score=70"); } else if(c1=='3') printf("score=60"); else if(c1=='2'||c1=='1') printf("score<60"); else printf("重新输入"); return 0; }
#笔试题目#