Computer Science, asked by sushmalvaddi, 4 months ago

write a program in java to find the reverse of a number...
Example:-46
output:-64
plzz answer fast
no irrelevant answers​

Answers

Answered by Anonymous
11

Answer:

class reverse

{

int main(int n)

{

int r=0, i, s=0;

System.out.println("Enter a number="+n)

for(i=n; i!=0; i/=10)

{

d=i%10;

r=(r*10)+d;

s+=r;

}

System.out.println("Reverse of number="+s)

return 0;

}

}

Explanation:

PLEASE MARK ME AS THE BRAINLIEST!!!

Similar questions