#K96127. Palindrome Checker
Palindrome Checker
Palindrome Checker
You are given a sequence of integers. Your task is to determine for each number (except the trailing zero) whether it is a palindrome. A number is considered a palindrome if it reads the same forwards and backwards. For a given integer \( n \), check if \( n = reverse(n) \). Note that the last number in the input is always 0, which signals the end of input and should not be processed.
Example:
Input: 121 23432 12321 12345 0</p>Output: Yes Yes Yes No
inputFormat
The input is read from the standard input (stdin) and consists of a series of integers, each provided on a new line. The sequence is terminated by a single 0, which is not considered part of the numbers to process.
Input Format:
... 0
outputFormat
For each integer (except the terminating 0), output a single line to the standard output (stdout) with either "Yes" or "No", indicating whether the number is a palindrome.
Output Format:
Yes/No Yes/No ...## sample
121
23432
12321
12345
0
Yes
Yes
Yes
No
</p>