九度oj题目1002:Grading

//不是说C语言就是C++的子集么,为毛printf在九度OJ上不能通过编译,abs还不支持参数为整型的abs()重载

//C++比较正确的做法是#include,cout的格式输出需要用到#include库函数,具体为:cout<

#include
#include
#include
using namespace std;
int maxscore(int ,int ,int);
int main()
{
	double p,t,g1,g2,g3,gj;
	while(cin>>p>>t>>g1>>g2>>g3>>gj)
	{
		double score;
		if(g1<=p&&g2<=p&&tg2)
	{
		if(g1>g3)
			score=g1;
		else
			score=g3;
	}else
	{
		if(g2>g3)
			score=g2;
		else
			score=g3;
	}
	return score;
}


转载于:https://www.cnblogs.com/simplelifestyle/p/3761906.html

你可能感兴趣的:(九度oj题目1002:Grading)