Question: C++ Create a function to swap two numbers. 1.Take two numbers from the user. 2.Create a void function that takes two number and swap them.
C++ Create a function to swap two numbers.
1.Take two numbers from the user. 2.Create a void function that takes two number and swap them. 3.The variables that you are passing to the function should be the same variable that you take from the user. 4.Display the number before the swap and after the swap. Note: You have to use only two variables in your main function. Note2: You should display the numbers from the main function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
