#include <iostream> using namespace std; int main(){ int a,b,c,d,max; cout<<"******"<<endl; cin>>a>>b>>c>>d; max=a>=b?a:b; max=max>=c?max:c; max=max>=d?max:d; cout<<"The max of them is:"<<max<<endl; return 0; }
#include <iostream> using namespace std; int max2(int p,int o,int i,int u); int max1(int a,int b); int main(){ int a,b,c,d,max; cin>>a,b,c,d; max=max2(a,b,c,d); cout<<"the large = "<<max<<endl; return 0; } int max2(int p,int o,int i,int u){ int m; m=max1(p,o); m=max1(m,i); m=max1(m,u); } int max1(int a,int b){ return a>b?a:b; }