Write a program in Java to input two unequal numbers. Display the numbers after swapping their
values in the variables using a third variable
Example:
Input: a = 34, b = 78
Output: a = 78, b = 34
Answers
Answered by
0
Answer:
gdgs
uxd
jxe
ixdbd
did
d
Answered by
1
Create your class
public static void main(String[] args) {
int a = 34;
int b = 78;
int c;
c = a;
a = b;
b = c;
System.out.println("a = " + a+ ", " + "b = " + b) ;
}
Similar questions
Biology,
3 months ago
English,
3 months ago
Social Sciences,
3 months ago
Math,
7 months ago
Physics,
1 year ago