Example
//Program demonstrates a fct calling another fct
void get_input(int& input1, int& input2);
//Reads two integers from the keyboard.
void swap_values(int& variable1, int& variable2);
//Interchanges the values of variable1 and variable2.
void order(int& n1, int& n2);
//Orders the numbers in the variables n1 and n2
//so that after the function call n1 <= n2.
void give_results(int output1, int output2);
//Outputs the values in output1 and output2.
//Assumes that output1 <= output2
int first_num, second_num;
get_input(first_num, second_num);
order(first_num, second_num);
give_results(first_num, second_num);
void get_input(int& input1, int& input2)
cout << "Enter two integers: ";
void swap_values(int& variable1, int& variable2)
void order(int& n1, int& n2)
void give_results(int output1, int output2)
cout << "In increasing order the numbers are: "
<< output1 << " " << output2 << endl;