#include
#include
int main(void)
{
int max(int x,int y);
int a, b, c;
scanf_s("%d,%d", &a, &b);
c=max(a,b);
printf("max=%d\n", c);
return 0;
system("PAUSE");
}
int max(int x, int y)
{
int z;
if (x > y)z = x;
else z = y;
return (z);
}
1>c:\users\huc\desktop\huc\huc\huc2.c(5): error C2059: 语法错误:“类型”
1>c:\users\huc\desktop\huc\huc\huc2.c(13): error C2059: 语法错误:“类型”
没有什么错。但是把函数原型写在函数内,这种写法是一种过时的写法,最好写
int max(int x,int y);
int main(void)
{
...
}
int max(int x,int y)
{
...
}
int max (x,y)