Write python program to input n number and to reverse the set of number without using function.
Answers
Answered by
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
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