怎么样正确编写函数
请问在编写函数时,void与return 0该怎么用,两个不可以同时出现在一个函数里吗
2013-01-05 21:04
2013-01-05 21:11
2013-01-05 21:14
2013-01-05 21:20
2013-01-05 21:33

2013-01-06 13:05
2013-01-06 13:24
程序代码:#include<stdio.h>
int main()
{
int max(int x,int y);
int a,b,c;
scanf("%d %d",&a,&b);
c=max(a,b);
printf("%d\n",c);
return 0;
}
void max(int x,int y)
{
int z;
z=x>y?x:y;
return;
}
有情人终成眷属了

2013-01-06 14:55

2013-01-06 20:08


2013-01-06 20:21