#include <iostream>
using namespace std;
int max(int a,int b){
return a>b?a:b;
}
float max(float a,float b){
return a>b?a:b;
}
char max(char a,char b){
return a>b?a:b;
}
int main(){
int m,n;
cout<<"Enter two integer:";
cin>>m>>n;
cout<<"The max is:"<<max(m,n)<<endl;
float x,y;
cout<<"Enter two real number:";
cin>>x>>y;
cout<<"The max is:"<<max(x,y)<<endl;
char s,r;
cout<<"Enter two words:";
cin>>s>>r;
cout<<"The max is:"<<max(s,r)<<endl;
return 0;
}
转载请注明原文地址: https://ju.6miu.com/read-36131.html