Question: If a C++ program contains code to declare both num1 and num2 as integers with a value of O and then accept any two numbers

 If a C++ program contains code to declare both num1 and

If a C++ program contains code to declare both num1 and num2 as integers with a value of O and then accept any two numbers from the user from the keyboard (to replace the values currently in num1 and num2). Write the code to swap the values in num1 and num2. The value in num1 ends up in num2 and the value of num2 ends up in num1. Note - you will likely need to declare an additional variable. (5 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!