Write a program to find whether a given number is a Palindrome number (number that is same when you read from forward or backward). You need to take a long integer number from user as input and verify whether it’s a number and positive or not. If the input is not valid (e.g., string or float) or positive, then notify the user and ask to input valid positive number again. If the number is valid then check whether it’s a palindrome number or not. [Hint: For splitting the digits from the given number, you need to use mod % and div / operators. E.g., 123/10 = 12 & 123%10 = 3]
*You need to have at least one user define function
*Language: C
Write a program to find whether a given number is a Palindrome number (number that is same when you read from forward or backward). You need to take a long integer number from user as input and verify whether it’s a number and positive or not. If the input is not valid (e.g., string or float) or positive, then notify the user and ask to input valid positive number again. If the number is valid then check whether it’s a palindrome number or not. [Hint: For splitting the digits from the given number, you need to use mod % and div / operators. E.g., 123/10 = 12 & 123%10 = 3]
Input: Key in a number to check: -23
Output: The number -23 is not valid
Key in a number to check: 123454321
The number 123454321 is a PALINDROME
Do you want to continue (y/n)? y
Key in a number to check: 456734
The number 456734 is NOT a PALINDROME
Do you want to continue (y/n)? n
Good bye!!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images