For each K, output the smallest palindrome larger than K.

Hello People.

I have some task...

"A positive integer is called palindrom if his team in the same system Decade

when read from left to right and from right to left. For a given positive integer k with no more than

12 digits to write the smallest value greater than K palindrom. The numbers are always

written without a leading zero (0)."

Input:

The first line contains integer t, the number of test cases. Integers K are given in the next t lines.

Output:

For each K, output the smallest palindrome larger than K.

example:

input:

2

808

2133

output:

818

2222

This is a task of a hope that will help me about this....Thanks in advance....:confused:

Re: For each K, output the smallest palindrome larger than K.

What have you done so far? Just dumping an assignment into the forums won't get you much back unless you show you've at least tried the assignment - which gives us a starting point to help you out.

Re: For each K, output the smallest palindrome larger than K.

Please post the code you need help with, or the algorithm you're using, and explain which part is causing you problems.