美文网首页
[C++ Primer] 练习3.5

[C++ Primer] 练习3.5

作者: 和平北路 | 来源:发表于2017-02-28 13:41 被阅读0次
#include <iostream>
#include <string>

using std::string;
using std::cout;
using std::cin;
using std::endl;

int main() {
    string current;
    string result;

    while (cin >> current) {
        result += current + " ";
        cout << result << endl;
    }
}

相关文章

网友评论

      本文标题:[C++ Primer] 练习3.5

      本文链接:https://www.haomeiwen.com/subject/diexgttx.html