#include <iostream>
using namespace std;
void jiaohuan(int *p1, int *p2);
int main( )
{
int a,b;
cin>>a>>b;
jiaohuan(&a,&b);
cout<<a<<" "<<b<<endl;
return 0;
}
//下面定义jiaohuan;
void jiaohuan(int *p1,int *p2)
{
int t;
t=*p1;
*p1=*p2;
*p2=t;
}
运行结果:
学习心得:
好好学习 天天向上