Computer Science, asked by neetusharma1511, 10 months ago

Write python program to input n number and to reverse the set of number without using function.

Answers

Answered by BlackWizard
3

Answer:

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

num2=0.

while(num!=0):

rem=num%10.

num=int(num/10)

num2=num2*10+rem.

print("The reverse of the number is",num2)

Answered by pavithranatarajan855
0

Answer:

n=int(input())

rev=0

while(n>0):

 digit=n%10

 rev=rev*10+digit

 n=n//10

print(rev)

Explanation:

Similar questions