Computer Science, asked by prasannasagi2002, 9 months ago

Write a java program to find reverse of a given number(non static method)

Answers

Answered by LEGEND778
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 naazminbegum
0

hope its useful

I tried my best

Attachments:
Similar questions