Java Program to reverse a number in Java Programming, you have to ask to the user to enter the number.
Start reversing the number, first make a variable rev and place 0 to rev initially, and make one more variable say rem.
Now place the modulus of the number to rem and place rev*10+rem to the variable rev, now divide the number with 10 and continue until the number will become 0.
SOURCE CODE ::
OUTPUT ::
need an explanation for this answer? contact us directly to get an explanation for this answer