Write a program to accept values of two numbers and interchange their values a short program
Answers
Answered by
10
Answer:
import java.util.*;
class Swap_With {
public static void main(String[] args) {
int x, y, t;// x and y are to swap.
Scanner sc = new Scanner(System.in);
System.out.println("Enter the value of X and Y");
x = sc.nextInt();
y = sc.nextInt();
Explanation:
Hope this will help you...
Similar questions