1053: Maximum output
Time limit: 1000 ms memory limit: 65536 KB
submitted Number: 27269 Number by: 18902
[Description Title
input three integers, separated by a space between the number and the number. Output an integer, i.e., the greatest integer.
[INPUT]
input line, comprising three integers, separated by a space between the number and the number.
[Output]
output line, comprising an integer, i.e., the greatest integer.
[Input] Sample
102 056
[output] Sample
56
[Source]
NO
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
int a;
int b;
int c;
int d;
cin>>a>>b>>c;
if(a>=b && a>=c)
d=1;
if(b>=a && b>=c)
d=2;
if(c>=b && c>=a)
d=3;
switch(d)
{
case 1 : cout << a; break;
case 2 : cout << b; break;
case 3 : cout << c; break;
}
return 0;
}