Write a program in Java to swap two numbers without using third variable
Using scanner class
Answers
Answered by
2
Answer:
The answer is in attachment.
.
...
.
.
Plzzz Follow me ...
.
Plzzzzz Thanks and like my Answer...
Attachments:
Answered by
0
Answer:
Swap two numbers without using third variable in java
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");
Similar questions