代码:
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
int x;
double GPA;
scanf("%d",&x);
if (x>=90) GPA=4.0;
else if (x>=60) GPA=4.0-(90-x)*0.1;
else{
x=int(sqrt(x))*10;
if (x<60) GPA=0;
else GPA=4.0-(90-x)*0.1;
}
printf("%.1lf",GPA);
return 0;
}
怎么办???