import java.util.Scanner;
public class Practice{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("enter the value of a :");
int a = sc.nextInt();
System.out.println("enter the value of b :");
int b = sc.nextInt();
System.out.println("the value and be is :\na = "+a+" and b = "+b+);
int temp;
temp = a ;
a = b;
b = temp;
System.out.println("the value a and b after the swappint is :\na = "+a+" and b = "+b);
}
}
0 Comments