poj1298 The Hardest Problem Ever

 1 #include<iostream>
 2 #include<cstring>
 3 using namespace std;
 4 int main()
 5 {
 6     char *p,s[201];
 7     while(cin.getline(s,100),strcmp(s,"ENDOFINPUT"))
 8     {
 9         if(!strcmp(s,"START")) continue;
10         else if(!strcmp(s,"END")) continue;
11         else{
12             for(p=s;*p;p++)
13                 if(isupper(*p)) *p=(*p-44)%26+'A';
14             cout<<s<<endl;
15         }
16     }
17     return 0;
18 }

 

posted on 2012-08-03 15:49  小花熊  阅读(164)  评论(0编辑  收藏  举报

导航