21天养成好习惯 21
#include<stdio.h>
int main()
{
int score;
char grade;
printf(“Please input score:”); scanf("%d", &score);
if (score < 0&&score > 100) printf(“Input error!\n”);
else if (score >= 90&&score<=100) grade = 'A’;
else if (score >= 80&&score<90) grade = ‘B’;
else if (score >= 70&&score<80) grade = ‘C’;
else if (score >= 60&&score<70) grade = ‘D’;
else
grade = ‘E’; printf(“grade:%c\n”, grade);
return 0;}