#include<stdio.h>
main()
{
int score;
printf("请输入成绩");
scanf("%c", &score);
switch(score)
{
case score<100:
printf(" You should work hard\n");
break;
case score>=100:
printf("You did vert well\n");
break;
defualt:
printf("用户未响应,操作取消\n");
}
}
switch害死人啊……
if (score<100)这才是你需要的
不能使用swtich进行判断范围吗,PS本人新手,正在尝试各种函数
追答不能,不过有些编译器的extension支持
怎么会有