5.3
#include<stdio.h>
int max2(int a,int b)
{if(a>=b)
return a;
else
return b;
}
int max4(int a,int b,int c,int d)
{int x,y,z;
x=max2(a,b);
y=max2(c,d);
z=max2(x,y);
return z;
}
int main()
{int a,b,c,d,x;
scanf ("%d%d%d%d",&a,&b,&c,&d);
x =max4(a,b,c,d);
printf("最大数为%d\n",x);
return 0;
}

浙公网安备 33010602011771号