~cpp #include<iostream> using namespace std; void swap(int *a,int *b); void main() { int a = 1; int b = 18; cout<<"a"<<a<<endl; cout<<"b"<<b<<endl; swap(a,b); cout<<"a"<<a<<endl; cout<<"b"<<b<<endl; } void swap(int *a,int *b) { int tmp; tmp = *a; *a = *b; *b = tmp; }