#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int max2(int a,int b) //定义max2函数
{ if(a>=b)
return a;
else
return b; }
int max4(int a,int b,int c,int d) //定义max4函数
{ int m;
m=max2(a,b);
m=max2(m,c);//
m=max2(m,d);//调用max2
return(m); //把m作为函数值带回main
}
int main()
{
int a,b,c,d,max;
printf("Please enter 4 interger numbers:");
scanf("%d%d%d%d",&a,&b,&c,&d);
max=max4(a,b,c,d); //调用max4函数
printf("max=%d \n",max);
return 0;
}