/* C++ Primer 习题 6.20 * By Ceeji */ #include <iostream> #include <string> using namespace std; int main() { string s, s1; s1 = ""; while (cin >> s) { if (s == s1) { cout << "Same: " << s << endl; break; } s1 = s; } if (s != s1) cout << "No Same words." << endl; } |
C++笔记:习题 6.20
转载请注明转自: 宁心勉学,慎思笃行 , 本文固定链接: C++笔记:习题 6.20
0 条评论