90分,第六个点we,求大佬救救孩子
查看原帖
90分,第六个点we,求大佬救救孩子
1165215
XTTian楼主2023/11/16 23:16
#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
#include<cstring>
#include<vector>
#include<math.h>
int main()
{
	int score = 0;
	double GPA = 0;
	cin >> score;
	if (score >= 90)
		GPA = 4;
	else if (score >= 60)
		GPA = 4 - (90 - score) * 0.1;
	else
	{
		if (sqrt(score) * 10 >= 60)
		{
			if (sqrt(score) * 10 >= 90)
				GPA = 4;
			else if (sqrt(score) * 10 >= 60)
				GPA = 4 - (90 - (sqrt(score) * 10) / 1) * 0.1;
		}
		else
			GPA = 0;
	}
	printf("%.1f", GPA);
	return 0;
}
2023/11/16 23:16
加载中...