【VC开源代码栏目提醒】:网学会员VC开源代码为您提供Ex02_5b.cpp参考,解决您在Ex02_5b.cpp学习中工作中的难题,参考学习。
#include <iostream.h>
void Swap(int &a,int &b); //声明函数
int main()//主函数
{
int x=2;
int y=10;
cout<<"x="<<x<<" y="<<y<<endl;
Swap(x,y);
cout<<"x="<<x<<" y="<<y<<endl;
return 0;
}
void Swap(int &a,int &b)//交换函数
{
int t;
t=a;
a=b;
b=t;
}
上一篇:
Ex02_5a.cpp
下一篇:
西班牙语医院科室名称