1.

Write a program in Java to accept two numbers and express the value without using third variable​

Answer»

ANSWER:

CLASS DEMO {

public STATIC void main(string arg[]) {

System.out.println("Before swapping");

int X = 10;

int y = 20;

System.out.println("value of x:" + x);

System.out.println("value of y:" + y);

system.out.println("After swapping");



Discussion

No Comment Found