#include "stdio.h"
int main()
{
int score;
printf("请输入一个成绩:");
scanf("%d",&score);
if(score>60 && score<=100)
printf("成绩合格\n");
else if(score<60 && score>=0)
printf("成绩不合格\n");
else
printf("输入的成绩有误\n");
}
#include
int main()
{
int i,score;
printf("Enter Grade: \n");
scanf("%d",&score);
switch(score/60){
case 1:printf("Pass\n");break;
case 0:printf("Fail\n");break;
}
return 0;
}
/*
输出:
Enter Grade:
59
Fail
*/