游客 Signup | Login
中文 | En

3968 - 输出三个数中最大数

输出三个数中最大数

Input

输入三个数

Output

输出最大数

Examples

Input

4 5 3

Output

5

Solution C

#include <stdio.h>

int main()
{
	int a, b, max;
	scanf("%d", &max);
	scanf("%d", &b);
	if (max < b)
	{
		max = b;
	}
	scanf("%d", &a);
	if (max < a)
	{
		max = a;
	}
	printf("%d\n", max);
	return 0;
}

Solution C++

#include<iostream>
using namespace std;
int main()
{
	int a,b,c,max;
	cin>>a>>b>>c;
	max=a;
	if (b>max) max=b;
	if (c>max) max=c;
	cout<<max<<endl;
	return 0;
}
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题