用条件表达式编程输出两个数中的大数
#include<iostream>
using namespace std;
int main()
{
int a,b,max;
cout<<"Input two numbers:\n";
cin>>a>>b;
max=a>b?a:b;
cout<<max;
return 0;
}
#include<iostream>
using namespace std;
int main()
{
int a,b,max;
cout<<"Input two numbers:\n";
cin>>a>>b;
max=a>b?a:b;
cout<<max;
return 0;
}