Advertisement
Spocoman

02. Repeat Strings

Nov 20th, 2023
612
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <sstream>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8.     stringstream ss;
  9.  
  10.     string line, word;
  11.     getline(ss, line);
  12.  
  13.  
  14.     while (cin >> word) {
  15.         for (int j = 0; j < word.length(); j++) {
  16.             cout << word;
  17.         }
  18.     }
  19.  
  20.     cout << endl;
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement