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