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 you convert stl to steps?
What is stl stack?
write a program to convert a decimal number in to its equivalent binary number?
how can u do connectivity in c++ language? plz send me connectivity code in c++ ?
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.
When did c++ add stl?
What is the use of stl?
How stl is different from the c++ standard library?
What is a stl vector?
What are the various types of stl containers?
Is string part of stl?
How connect plc and pc through software
What are the components of stl?
In what scenario does the Logical file and Physical file being used?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.