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

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

1657


sir please send me bpcl previous question papers

1948


What are stl algorithms?

614


i wanted to know about questions about c,c++ , which is required for placements.... im a fresher

1696


What is stl stand for?

731






Define stl.

768


Who wrote stl?

671


Is string part of stl?

672


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

1773


totoo po ba ang manga aliens!

2331


What is stl in c++ with example?

630


Why should a c++ programmer be interested in stl?

638


how can u do connectivity in c++ language? plz send me connectivity code in c++ ?

1888


How do you convert stl to steps?

624


What is stl stack?

656