Computer Science, asked by mohammedshifan, 7 months ago

Kumar of class 12 is writing a program to reverse number. He has written the following code. As a programmer, help him to successfully execute the given task. n=int(input("enter the number")) d=0 r=0 while n>0: ------------- //line1 ------------ //line2---------//line3 print(,r)​

Answers

Answered by anindyaadhikari13
2

Answer:-

This is a program that will reverse a number.

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

s=0

while n!=0:

s=s*10+n%10

n=n//10

print("Reversed Number is: ",s)

Example:-

Enter a number: 234

Reversed Number is: 432

Similar questions