c++ question 003 求两数大者?
#include <iostream>
using namespace std;
int main(){
//求两数中的大者?
int a,b;
cin>>a>>b;
if(a>b)
cout<<"The max number is:"<<a;
else
cout<<"The max number is:"<<b;
}
method two:
#include <iostream>
using namespace std;
int main(){
//求两数中的大者?
int a,b,max;
cin>>a>>b;
if(a>b)
max=a;
else
max=b;
cout<<"The max number is:"<<max;
}
Never waste time any more, Never old man be a yong man