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
How do I convert a stl file?
What do stl stand for?
What does stl stand for in basketball?
What are the different types of stl containers?
What are the symptoms of stl?
What is a stl vector?
write a program to convert a decimal number in to its equivalent binary number?
Who created stl?
How stl is different from the c++ standard library?
how to use C++?
What is meant by stl in c++?
Name the different types of stl containers.
Is stl open source?
What two types of containers does the stl provide?
In what scenario does the Logical file and Physical file being used?