答案:
#include <iostream>
using namespace std;
int main()
{
int a,b,c,max;
cout << "please enter a,b,c:";
cin>>a>>b>>c;
max=(a>b)?a:b;
max=(max>c)?max:c;
cout << "the max is:"<<max<<endl;
return 0;
}
答案:
#include <iostream>
using namespace std;
int main()
{
int a,b,c,max;
cout << "please enter a,b,c:";
cin>>a>>b>>c;
max=(a>b)?a:b;
max=(max>c)?max:c;
cout << "the max is:"<<max<<endl;
return 0;
}