描述
已知有三个不等的数,将其中的最大数找出来。
输入描述
输入只有一行,包括3个整数。之间用一个空格分开。
输出描述
输出只有一行(这意味着末尾有一个回车符号),包括1个整数。
具体见下列
#include<iostream>
using namespace std;
int main()
{
int a,b,c,t=0;
cin>>a>>b>>c;
if(a>b)
{t=a;a=b;b=t;}
if(a>c)
{t=a;a=c;c=t;}
if(b>c)
{t=b;b=c;c=t;}
cout<<c;
return 0;
}
打赏一下吧