poj 1298 The Hardest Problem Ever

题目链接:http://poj.org/problem?id=1298

题目大意:按照所给的顺序要求将输入的字符串进行排列。

 1 #include <iostream>
 2 #include <cstdio>
 3 #include <cstring>
 4 using namespace std;
 5 int main ()
 6 {
 7     char str[27]= {"VWXYZABCDEFGHIJKLMNOPQRSTU"};
 8     char ch[100];
 9 
10     while (1)
11     {
12         gets(ch);
13         if (strcmp(ch,"START")==0)//strcmp是字符的一个函数,也就是两者之间的比较
14             continue;
15         else if (strcmp(ch,"END")==0)
16             continue;
17         else if (strcmp(ch,"ENDOFINPUT")==0)
18             break;
19         for (int i=0; ch[i]!='