C语言中输入等级得出成绩分数的程序,用if和else语句

如题所述

#include<stdio.h>
int main()
{ char c;
scanf("%c",&c);
if(c=='A')printf("%c:100~85\n",c);
else if(c=='B')printf("%c:84~70\n",c);
else if(c=='C')printf("%c:69~60\n",c);
else if(c=='D')printf("%c:59~0\n",c);
else printf("Input error!\n");
return 0;
}
温馨提示:答案为网友推荐,仅供参考
相似回答