马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?欢迎注册
×
本帖最后由 winxos 于 2009-8-26 15:00 编辑
- #include <iostream>
- using namespace std;
- int main()
- {
- system("MODE CON COLS=150");
- system("COLOR 0a");
- int j,k;
- char ii[1000]={35,105,110,99,108,117,100,101,32,60,105,111,115,116,114,101,97,109,62,10,
- 117,115,105,110,103,32,110,97,109,101,115,112,97,99,101,32,115,116,100,59,10,
- 105,110,116,32,109,97,105,110,40,41,10,
- 123,10,
- 9,115,121,115,116,101,109,40,34,77,79,68,69,32,67,79,78,32,67,79,76,83,61,49,53,48,34,41,59,10,
- 9,115,121,115,116,101,109,40,34,67,79,76,79,82,32,48,97,34,41,59,10,
- 9,105,110,116,32,106,44,107,59,10,
- 9,99,104,97,114,32,105,105,91,49,48,48,48,93,61,123,125,59,10,
- 9,102,111,114,32,40,106,32,61,32,48,59,106,32,60,32,115,116,114,108,101,110,40,105,105,41,59,106,43,43,41,10,
- 9,123,10,
- 9,9,105,102,40,105,105,91,106,45,50,93,32,61,61,32,39,61,39,32,38,38,32,105,105,91,106,45,49,93,32,61,61,32,39,123,39,41,10,
- 9,9,123,10,
- 9,9,9,102,111,114,32,40,107,32,61,32,48,59,107,32,60,32,115,116,114,108,101,110,40,105,105,41,45,49,59,107,43,43,41,10,
- 9,9,9,123,10,
- 9,9,9,9,105,102,32,40,105,105,91,107,93,32,61,61,32,49,48,41,32,99,111,117,116,60,60,34,92,110,92,116,92,116,34,59,10,
- 9,9,9,9,101,108,115,101,32,99,111,117,116,60,60,40,105,110,116,41,105,105,91,107,93,60,60,34,44,34,59,10,
- 9,9,9,125,10,
- 9,9,9,99,111,117,116,60,60,40,105,110,116,41,105,105,91,107,93,60,60,39,125,39,59,10,
- 9,9,125,10,
- 9,9,101,108,115,101,10,
- 9,9,123,10,
- 9,9,9,99,111,117,116,60,60,105,105,91,106,93,59,10,
- 9,9,125,10,
- 9,125,10,
- 9,114,101,116,117,114,110,32,48,59,10,
- 125,10};
- for (j = 0;j < strlen(ii);j++)
- {
- if (ii[j-2] == '=' && ii[j-1] == '{')
- {
- for (k = 0;k < strlen(ii)-1;k++)
- {
- if (ii[k] == 10) cout<<"10,\n\t\t";
- else cout<<(int)ii[k]<<",";
- }
- cout<<(int)ii[k]<<'}';
- }
- else
- {
- cout<<ii[j];
- }
- }
- return 0;
- }
复制代码 困扰了许久的问题。 |