四个整数求最大(函数嵌套)

#include<stdio.h>

int max(int a,int b)
{
int z;
z=a>b?a:b;
return(z);
}
int main()
{
int max(int,int);
int a,b,c,d,m;
printf(“please enter four number :”);
scanf(“%d %d %d %d”,&a,&b,&c,&d);
m=max(max(max(a,b),c),d);
printf(“\n the max number is :%d\n”,m);
}

猜你喜欢

转载自blog.csdn.net/qq_41661800/article/details/81704975