Computer Science, asked by shibakhatoon, 9 months ago

Q6. Write a program to take a number of five digits and print its reverse.
Example: Input 56789
Output 98765​

Answers

Answered by Anonymous
3

Python program for printing digits in reverse:-

.

n = int(input('Enter a number : '))

reversed = 0

while(n!=0):

r=int(n%10)

reversed = reversed*10 + r

n=int(n/10)

Similar questions