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
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
Sociology,
3 months ago
Math,
3 months ago
Social Sciences,
7 months ago
Computer Science,
7 months ago
Environmental Sciences,
1 year ago
Geography,
1 year ago