New course! Every coder should learn Generative AI!
Try a free lesson+ 1
N=int(input('enter the number')) R=0 while N>0: D=N%10 R=R*10+D N=N/10 print("reverse of the number=",R)
Is this program correct of not in python If no the correct it in python programming language only.
3 Answers
0
What is the correct answer
+ 2
N=int(input('enter the number'))
R=0
while(N>0):
D=N%10
R=R*10+D
N=N//10
print("reverse of the number=",R)
+ 1
Edited : Program is correct but indentation issue..
And please don't post questions in a such a way..
give a basic hint of your problem in the questions field
and in the description field explain your problem.. and in relevant tag mention just the language and technology which is related to your problem.. and share the code using Insert button.. and then choose the code which you have written in codeplayground