Question: help DQuestion 6 Write a small program to swap two numbers. Ask the user to input two integers into two variables a and b respectively.

 help DQuestion 6 Write a small program to swap two numbers.

help

DQuestion 6 Write a small program to swap two numbers. Ask the user to input two integers into two variables a and b respectively. Write three lines of code to swap the values of a and b. So at the end the following line of code System.out.println( "a aand b "b); should print out value of a as whatever the user entered for b and value of b as whatever user entered for a. So for example if user enters 4 and 3 as input for a and b respectively, then the print out should print: a 3 and b 4 Paragraph

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!