主题:[讨论]帮忙改错啊
#include<stdio.h>
void main()
{
int a,b;
a=3;
b=4;
swap(a,b);
printf("%d,%d\n",a,b);
}
void swap(int x,int y)
{
int t;
t=x;x=y;y=t;
}
int类型做形式参数,无法蒋实际参数的变化信息返回,应该怎么改呢...新手上路,请大家多多帮忙,感激不尽...
void main()
{
int a,b;
a=3;
b=4;
swap(a,b);
printf("%d,%d\n",a,b);
}
void swap(int x,int y)
{
int t;
t=x;x=y;y=t;
}
int类型做形式参数,无法蒋实际参数的变化信息返回,应该怎么改呢...新手上路,请大家多多帮忙,感激不尽...