Write a program to print the swapping in two no and using
three variable.

Answer Posted / manasa bugude

import java.util.Scanner;

public class SwappMethod {

public static void main(String[] args)
{
int a,b,c,d;
Scanner scn=new Scanner(System.in);
System.out.println("enter the value of a,b and c");
a=scn.nextInt();
b=scn.nextInt();
c=scn.nextInt();
System.out.println("before swapping numbers:"+a+" "+b+" "+c);
d=a;
a=b;
b=c;
c=d;
System.out.println("after swapping number:"+a+" "+b+" "+c);
System.out.println();

}

}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I convert a stl file?

562


What do stl stand for?

638


What does stl stand for in basketball?

640


What are the different types of stl containers?

647


What are the symptoms of stl?

602






What is a stl vector?

625


write a program to convert a decimal number in to its equivalent binary number?

2079


Who created stl?

647


How stl is different from the c++ standard library?

639


how to use C++?

2063


What is meant by stl in c++?

652


Name the different types of stl containers.

687


Is stl open source?

630


What two types of containers does the stl provide?

568


In what scenario does the Logical file and Physical file being used?

2322