//将学生的成绩输入后,程序给出等级,80~100为A,60~80为B,60以下输出“sorry ,you are not passed”,100分输出“perfect”//
#include <stdio.h>
int main()
{
int i,n;
printf("请键入学生成绩\n");
scanf("%d",&i);
n=i/10;
n>0;
switch(int(n))
{
case 10:
printf("pefect\n");
break;
case 8:
case 9:
printf("A\n");
break;
case 7:
case 6:
printf("B\n");
break;
}
if(n>10)
printf("error in input data,please cheak\n");
else if(n<6)
printf("you are not passed\n");
return 0;
}