style of function definition is now obsolete 求助
本人使用turbo c3.0 64位 开发平台,编译以下程序时,遇到如下警告和错误,求各位大师指点如何解决:warning:style of function definition is now obsolete //int max(a,b); 行对应的警告;
error:Declaration was expected //int max(a,b); 行对应的错误
error:'main' is not a parameter //int x,y,z; 行对应的错误
error:, expected //int x,y,z; 行对应的错误
#include<stdio.h>
int max(a,b);
void main()
{int x,y,z;
printf("input two numbers \n");
scanf("%d,%d",&x,&y);
z = max(x,y);
printf("maxnum is :%d",z);
}
int max(a,b)
{
if(a>b)
return a;
esle
return b;
}