/*
输入a,b 求两个数中的较大者
*/
#include <stdio.h>
int main()
{
int a,b,c;
scanf("%d %d",&a,&b);
c=max(a,b);
printf("the max number is %d.\n",c);
return 0;
}
int max(int x,int y)
{
if(x<y)
return y;
else
return x;
}
输入:
5 7
输出结果:
the max number is 7.