fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main(int argc, char* argv[]){
  7. if(argc){
  8. string s;
  9. for(int i = 1; i < argc; i++)
  10. s += argv[i];
  11.  
  12. unsigned found = -1;
  13. string replacer = s.substr(0, 3);
  14. while((found = s.find("...")) < s.size() && found > 3)
  15. s.replace(found, 3, replacer);
  16. cout << s << endl;
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout