to check no. is palindrome or not by iterative algorithm and flowchart
Answers
Answered by
0
Answer:
num=int(input("Enter a number:"))
temp=num
rev=0
while(num>0):
dig=num%10
rev=rev*10+dig
num=num//10
if(temp==rev):
print("The number is palindrome!")
else:
print("Not a palindrome!")
hope it helps
Attachments:
Similar questions