#include<stdio.h>
#include<stdlib.h>
void main()
{
int grade,s;
printf("grade=");
scanf("%d",&grade);
if(grade>100||grade<0) printf("error ");
else
{
if (grade>=80) s=1;
else if (grade>=70) s=2;
else if (grade>=60) s=3;
else if (grade>=0) s=4;
}
switch(s)
{
case 1: printf("A\n");break;
case 2: printf("B\n");break;
case 3: printf("C\n");break;
case 4: printf("D\n");break;
default : printf("error\n");
}
system("pause");
}