基础问题;为什么我无论输入任何数据,其输出的结果为都是E
#include "stdio.h"main()
{
float num;
char grade;
scanf("%d",&num);
if(num>=90) grade='A';
else if (num>=80&&num<90) grade='B';
else if (num>=70&&num<80) grade='C';
else if (num>=60&&num<70) grade='D';
else grade='E';
printf("%c",grade);
}