C语言不支持在函数内定义函数,需要改为:
#include
int max(int x,int y)//函数的定义
{
int z;
if (x>y)
z=x;
else
z=y;
return z;
}
void main ()
{
int num1,num2,num3,max1,max2;
int max(int x,int y);//函数的声明
printf ("Please input three integer numbers:");
scanf ("%d,%d,%d",&num1,&num2,&num3);
max1=max(num1,num2);//函数的调用
max2=max(max1,num3);
printf ("The max among %d,%d and %d is %d\n",num1,num2,num3,max2);
}