max函数!问题!

659阅读 2评论2012-12-09 古丁高手
分类:C/C++

#include
int main()
{
 int a,b,c;
 int max(int x,int y);
 printf("please input a and b :");
 scanf("%d,%d\n",&a,&b);
 c = max(a,b);
 printf("the max number is %d\n",c);
 return 0;
}
int max(int x,int y)
{
 int z;
 if (x > y) z=x;
 else z=y;
 return (z);
}
 
 
怎么编译执行后都是返回第一个输入整数呢?貌似语句没错啊!
上一篇:oracle11g里面pl\sql developer 登录提示:ora-12514 tns监听程序当前无法识别连接描述符中请求的服务
下一篇:一个for循环不能达到自己的母的,不知道为什么?

文章评论