12345678910111213141516
#include <string> #include <iostream> int main() { std::string str; // some condition, just 10 characters here for demonstrative purposes for (int i = 0; i < 10; ++i) { char c; std::cin >> c; str += c; } std::cout << str << std::endl; return 0; }