A “palindrome string” is a string that is the same as both the forward and reverse reading. For example, “level” or “noon” is a palindrome string. Please write a program to determine whether the read string is “palindrome”.
The input contains multiple test instances. The first line of input data is a positive integer n, which represents the number of test instances, followed by n strings.
If a string is a palindrome, it outputs “yes”, otherwise it outputs “no”.
Using C++ 11 features. reverse.
1 |
|