#include<stdio.h>
//#include<iostream>
//using namespace std;
int a=0;
int b=0;
int c=0;
int max(int x,int y)
{
int z;
if(x>y) z=x;
else z=y;
return(z);
}
int main(void)
{
while(1)
{
scanf("%d, %d",&a,&b);
c=max(a,b);
//prinf()
printf("max is %d\n",c);
if(a==100)
break;
}
/* while(1)
{
cin >> a >> b;
c=max(a,b);
//prinf()
cout << c;
if(a==100)
break;
}*/
return 0;
}
输入形式 3,2
#include<stdio.h>
//#include<iostream>
//using namespace std;
int a=0;
int b=0;
int c=0;
int max(int x,int y)
{
int z;
if(x>y) z=x;
else z=y;
return(z);
}
int main(void)
{
while(1)
{
scanf("%d %d",&a,&b);
c=max(a,b);
//prinf()
printf("max is %d\n",c);
if(a==100)
break;
}
/* while(1)
{
cin >> a >> b;
c=max(a,b);
//prinf()
cout << c;
if(a==100)
break;
}*/
return 0;
}
输入形式 3 2
#include<stdio.h>
//#include<iostream>
//using namespace std;
int a=0;
int b=0;
int c=0;
int max(int x,int y)
{
int z;
if(x>y) z=x;
else z=y;
return(z);
}
int main(void)
{
while(1)
{
scanf("%d%d",&a,&b);
c=max(a,b);
//prinf()
printf("max is %d\n",c);
if(a==100)
break;
}
/* while(1)
{
cin >> a >> b;
c=max(a,b);
//prinf()
cout << c;
if(a==100)
break;
}*/
return 0;
}