Computer Science, asked by sh4634705, 1 year ago

python program to check palindrome

Answers

Answered by sdidadaibrahim
4

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!")

please mark this answer as brainlist

follow me i'll follow you thank you

Answered by anindyaadhikari13
2

Question:-

Write a python program to check palindrome.

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