Print? Description
A "text return string" is a string with the same reading and deserialization. For example, "level" or "noon" is a text return string. Write a program to check whether the read string is a "reply ".
Input
The input contains multiple test instances. The first line of the input data is a positive integer n, indicating the number of test instances. It is followed by n strings, and the length of each string cannot exceed 30.
Output
If a string is a return string, "yes" is output; otherwise, "no" is output ".
Sample Input
4
Level
Abcde
Noon
Haha
Sample Output
Yes
No
Yes
No
Description
A "text return string" is a string with the same reading and deserialization. For example, "level" or "noon" is a text return string. Write a program to check whether the read string is a "reply ".
Input
The input contains multiple test instances. The first line of the input data is a positive integer n, indicating the number of test instances. It is followed by n strings, and the length of each string cannot exceed 30.
Output
If a string is a return string, "yes" is output; otherwise, "no" is output ".
Sample Input
4
Level
Abcde
Noon
Haha
Sample Output
Yes
No
Yes
No
[Plain] # include <stdio. h>
# Include <string. h>
Int main ()
{
Int I;
Int flag;
Int num;
Int length;
Char string [101];
Scanf ("% d", & num );
Getchar ();
While (num --)
{
Gets (string );
Length = strlen (string );
Flag = 1;
For (I = 0; I <length-i-1; I ++)
{
If (string [length-i-1]! = String [I])
{
Flag = 0;
}
If (flag = 0)
{
Break;
}
}
If (flag)
{
Printf ("yes ");
}
Else
{
Printf ("no ");
}
If (num> 0)
{
Printf ("\ n ");
}
}
Return 0;
}
# Include <stdio. h>
# Include <string. h>
Int main ()
{
Int I;
Int flag;
Int num;
Int length;
Char string [101];
Scanf ("% d", & num );
Getchar ();
While (num --)
{
Gets (string );
Length = strlen (string );
Flag = 1;
For (I = 0; I <length-i-1; I ++)
{
If (string [length-i-1]! = String [I])
{
Flag = 0;
}
If (flag = 0)
{
Break;
}
}
If (flag)
{
Printf ("yes ");
}
Else
{
Printf ("no ");
}
If (num> 0)
{
Printf ("\ n ");
}
}
Return 0;
}