1. Engineering
  2. Computer Science
  3. help...

Question: help...

Question details

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


Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution