Write a Python program to check if a given number is a palindrome or not
Answers
Answered by
2
Answer:
n=int(input("Enter number:")) temp=n rev=0 while(n>0): dig=n%10 rev=rev*10+dig n=n//10 if(temp==rev): print("The number is a palindrome!") else: print("The number isn't a palindrome!") 1. User must first enter the value of the integer and store it in a variable. 2.
Answered by
0
Answer:
n=int(input("Enter number:")) temp=n rev=0 while(n>0): dig=n%10 rev=rev*10+dig n=n//10 if(temp==rev): print("The number is a palindrome!") else: print("The number isn't a palindrome!") 1. User must first enter the value of the integer and store it in a variable. 2.
Similar questions