#4555: C++第9個測資點?


cj6503rmp4 (罪影)


#include <iostream>
using namespace std;
int main(){
           int max = 1000;
           char word[max];
           int p;
           while(cin.getline(word,max,'\n')){
                                             int i = strlen(word)/2;
                                             int j = i;
                                             for(i=i-1;i>=0;i--){
                                                                 if(word[i]==word[j]){
                                                                                      j++;
                                                                                      p = 1;}
                                                                 else{p = 0;                    
                                                                      break;}}
           if(p==1)
           cout << "yes" << endl;
           else
           cout << "no" << endl;}
           return 0;}