Program 1: [cpp] # include <iostream> using namespace std; void jiaohuan (int x, int y); // defines the int main () {int a, B; cin> a> B; if (a <B) jiaohuan (a, B); // call the exchange function // output the values of a and B, because the value of the form parameter is changed in the exchange function and the value of the real parameters a and B is not changed, the output is the original value cout <", B = "<a <", "<B; return 0;} // The void jiaohuan (int x, int y) {int t; result: Program 2: [cpp] # include <iostream> using namespace std; void jiaohuan (int * x, int * y); // defines the exchange function int ma In () {int a, B; cin> a> B; if (a <B) jiaohuan (& a, & B ); // call the exchange function // because the exchange function calls the address values of a and B, the function can change the value of the real parameter by changing the address value, so that a and B exchange. Cout <"a, B =" <a <"," <B; cout <endl; return 0 ;} // void jiaohuan (int * x, int * y) {int t; t = * x; * x = * y; * y = t;} result: program 3: [cpp] # include <iostream> using namespace std; void jiaohuan (int & x, int & y); // defines the int main () {int, b; cin> a> B; if (a <B) jiaohuan (a, B); // call the exchange function. // The function calls references of a and B, the values of a and B are exchanged by exchanging references of a and B in the function. Cout <"a, B =" <a <"," <B; cout <endl; return 0 ;} // The void jiaohuan (int & x, int & y) {int t; t = x; x = y; y = t;} result of the function exchange: