Write a java program to find reverse of a given number(non static method)
Answers
Answered by
0
Answer:
Reverse Number program in Java
Java program to reverse a number
class ReverseNumber. { public static void main(String args[]) { int n, reverse = 0;
System. out. println("Enter an integer to reverse"); Scanner in = new Scanner(System. in); n = in. nextInt();
while(n != 0) { reverse = reverse * 10; reverse = reverse + n%10; n = n/10; }
pls mark as brainliest answer
Explanation:
Answered by
0
hope its useful
I tried my best
Attachments:
Similar questions
Social Sciences,
4 months ago
Biology,
4 months ago
Accountancy,
4 months ago
English,
9 months ago
English,
1 year ago