90pts,求条
查看原帖
90pts,求条
1152121
UzumakiBoruto楼主2023/12/2 08:53

代码:

#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;
}

怎么办???

2023/12/2 08:53
加载中...