Write a program that reads several integers and prints whether they are palindrome or not. A number is palindrome if it is unchanged after being reversed. The number 616 is palindrome. The number 1234 is not palindrome.
Input will consist of several lines each with a number n where 0 ≤ n ≤ 1 000 000 000.
For each line of input, output should contain a single line with one of the following two messages:
<n> is palindrome, if the number n is palindrome;
<n> is not palindrome, if the number n is not palindrome;
<n> replaced by the number n.
616 1234 789987
616 is palindrome 1234 is not palindrome 789987 is palindrome
Your program should be implemented using a
that receives one integer and
returns a boolean value indicating whether it is palindrome.
Please refer to the information for the chosen language:
int palindrome(int x);
palindrome :: Int -> Bool
bool palindrome(int x);
public static bool Palindrome(int x)in a public class
public static boolean palindrome(int x)in a public class
function palindrome (x)
Submit your solution to be graded according to the following list:
Copyright © 2020-2023 Rudy Matela
All rights reserved