[C++ Primer] 练习3.4
作者:
和平北路 | 来源:发表于
2017-02-28 11:43 被阅读0次#include <iostream>
#include <string>
using std::string;
using std::cout;
using std::cin;
using std::endl;
int main() {
string first;
string second;
cin >> first >> second;
if (first > second) {
cout << first << endl;
} else if (first < second) {
cout << second << endl;
}
if (first.size() > second.size()) {
cout << first << endl;
} else if (first.size() < second.size()) {
cout << second << endl;
}
}
本文标题:[C++ Primer] 练习3.4
本文链接:https://www.haomeiwen.com/subject/rmrxgttx.html
网友评论