scanf("%d",&num);
if(num<0||num>100)printf("The number is wrong!");
else if(num<=59)printf("E");
else if(num<=69)printf("D");
else if(num<=79)printf("C");
else if(num<=89)printf("B");
else printf("A");
return 0;
}
Switch 语句
#include <stdio.h>
main()
{
int num,n;
printf("Input:");
scanf("%d",&num);
n=num/10;
switch(n)
{
case 0:
case 1:
case 2:
case 3:
case 4:
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库c语言实验报告(8)在线全文阅读。
相关推荐: