Remember that the data variable names defined in main can


Instructions:

Write a main method to:

Set up two values in main, a and b.

read in two variables using a Read function

while (a != 0)

print two variables using a Print function

switch the data in the two variables, using a Swap function

print two variables again using the Print function

read in two variables using Read Function

stop

Read Function - pass by reference

Code a function that reads in two variables.

Print Function - pass by value

Code a function that prints out two variables with documentation, such as:

"The first value is " ______

"The second value is "______

Swap Function - pass by reference

Code a function that will switch the values of two memory positions in main

Main Function

Code a main method/function that will accomplish the 4 steps given above.

Remember that the data variable names defined in main can be different from the data variable names used in the functions.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Remember that the data variable names defined in main can
Reference No:- TGS01495499

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)