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
What are the different types of stl containers?
Why should a c++ programmer be interested in stl?
How stl is different from the c++ standard library?
What does stl stand for in basketball?
What is a stl vector?
What is a standard template library (stl)?
What two types of containers does the stl provide?
What is stl stack?
What is stl stand for?
How does an stl file work?
a program using one dimensional array that searches a number if it is found on the list of given input numbers given by the user and locate its exact location in the list.
Name the different types of stl containers.
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
When did c++ add stl?
To modify an, existing worksheet. What steps are involved for: 1. Inserting and deleting rows and columns. 2. Printing cell formulas 3Jld displayed values 3. Using the page setup command