这个程序代码错在哪里?

来源:百度知道 编辑:UC知道 时间:2024/06/22 03:27:44
#include<stdio.h>
void main()
{ int swap(int a,int b);
int a,b;
scanf("%d,%d",&a,&b)
printf("please input a,b");
swap(a,b);
printf("%d,%d\n",a,b);
}
int swap( int x,int y)
{ int temp;
if x>y
temp=x;x=y;y=temp;
return;
}
希望能帮我调试一下,在VC上。

#include<stdio.h>
void main()
{ int swap(int a,int b);
int a,b;
printf("please input a,b");
scanf("%d,%d",&a,&b)
swap(a,b);
printf("%d,%d\n",a,b);
}
int swap( int x,int y)
{ int temp;
temp=x;
x=y;
y=temp;
return;
}
如果是要把两个数交换了输出的话就是这样了.