1.

Write a program in python to check whether a number is palindrome or not with loop​

Answer»

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



Discussion

No Comment Found