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
Is string part of stl?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
What is a stl vector?
i wanted to know about questions about c,c++ , which is required for placements.... im a fresher
How do I convert a stl file?
When did c++ add stl?
How do you convert stl to steps?
how to use C++?
What is stl stand for?
Do you like to Submit Questions in Bulk under Same Category?? Then use our Bulk ListerDo you like to Submit Questions in Bulk under Same Category?? Then use our Bulk Lister
draw a flowchart that accepts two numbers and checks if the first is divisible by the second.
How stl is different from the c++ standard library?
What are the components of stl?
sir please send me bpcl previous question papers
What two types of containers does the stl provide?