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

Answer Posted / anonymous

import java.util.*;
class S3v
{
public static void main(String args[])
{
int a,b,c;
Scanner s=new Scanner(System.in);
a=s.nextInt();
b=s.nextInt();
c=a-b;
a=a-c;
b=b+c;
System.out.print(a+" "+b);
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When did c++ add stl?

921


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

2255


What are stl algorithms?

831


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

831


How connect plc and pc through software

2132






What are the symptoms of stl?

799


What is stl language?

833


write a program that will accept a number and print.its equivalent in words the maximum input number is 9999

2680


How do you convert stl to steps?

818


What is stl in c++ with example?

823


Is stl part of c++ standard?

806


please visit this site you'll find my question this is my homework please answer it if you can http://easyscience.org/ib/lofiversion/index.php/t36168.html

1977


What is the stl, standard template library?

800


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.

2158


What is a stl vector?

810