Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...



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


Please Help Members By Posting Answers For Below Questions

Is string part of stl?

1213


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

2641


What is a stl vector?

1266


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

2215


How do I convert a stl file?

1110


When did c++ add stl?

1234


How do you convert stl to steps?

1160


how to use C++?

2551


What is stl stand for?

1236


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

2091


draw a flowchart that accepts two numbers and checks if the first is divisible by the second.

3383


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

1229


What are the components of stl?

1113


sir please send me bpcl previous question papers

2403


What two types of containers does the stl provide?

989