Write a program in Java to input two numbers. Display the numbers after swapping them by using a third variable.
Sample Input: a = 24, b = 38
Sample Output: a = 38, b = 24
Answers
Answered by
0
Explanation:
The smile on my face doesn’t mean my life is perfect, it just means I appreciate what I have and what God has blessed me with...
or if you like this please give me thanks and follow me..
hii my brothers and sisters please help me to complete my 1000 answer please.....
Answered by
1
Answer:
public class Main
{
public static void main(String[] args) {
int a=24, b=38,c;
c=b;
b=a;
a=c;
System.out.println(a);
System.out.println(b);
}
}
Similar questions