pallendriome program in python
Answers
Answered by
1
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!")
Answered by
2
Question:-
- Write a program in python to check whether the entered number is palindrome or not.
Program:-
n=int(input("Enter a number: "))
x, s=n, 0
while n!=0:
s=s*10+n%10
n=n//10
if(s==x):
print("Number is palindrome. ")
else:
print("Number is not palindrome. ")
Similar questions
Science,
3 months ago
Math,
3 months ago
Computer Science,
3 months ago
Math,
8 months ago
English,
1 year ago