import java.util.Scanner;
class Swapnumber
{
public static void main(String[] args)
{
int a, b;
Scanner s=new Scanner(System.in);
System.out.println("Enter Value in a :");
a=s.nextInt();
System.out.println("Enter Value in b :");
b=s.nextInt();
a=a+b;
b=a-b;
a=a-b;
System.out.println("Values in a:" +a);
System.out.println("Values in b:" +b);
}
}
OUTPUT ::
Enter Value in a :
5
Enter Value in b :
2
Value in a : 2
Value in b : 5
SOURCE CODE :
OUTPUT ::
need an explanation for this answer? contact us directly to get an explanation for this answer