题库 信息学奥赛题库 题目列表 #include <iostream>using namespace std;int m...
填空题

#include <iostream>

using namespace std;

int main() {

int i, length1, length2;

string s1, s2;

s1 = "I have a dream.";

s2 = "I Have A Dream.";

length1 = s1.size();

length2 = s2.size();

for (i = 0; i < length1; i++)

if (s1[i] >= 'a' && s1[i] <= 'z')

s1[i] -= 'a' - 'A';

for (i = 0; i < length2; i++)

if (s2[i] >= 'a' && s2[i] <= 'z')

s2[i] -= 'a' - 'A';

if (s1 == s2)

cout << "=" << endl;

else if (s1 > s2)

cout << ">" << endl;

else

cout << "<" << endl;

return 0;

}

输出:_________

题目信息
阅读程序 2016年 初赛
-
正确率
0
评论
192
点击