请编写fun函数写程序,从键盘输入百分之成绩,要求输出等级制成绩A,B,C,D.90100分为A,8089分为B,6079分为C,159分为D.
#include <stdio.h>
int main()
{
unsigned int score;
printf("输入分数:\n");
scanf_s("%d", &score);
if (score >= 90 && score <= 100)
{
printf("你的等级A");
}
if (score >= 80 && score < 90)
{
printf("你的等级B");
}
if (score >= 70 && score < 80)
{
printf("你的等级C");
}
if (score >= 60 && score < 70)
{
printf("你的等级D");
}
return 0;
}