Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- void func(std::string str,string::size_type k = 0, string::size_type pos = 0)
- {
- k = str.find(".", pos);
- if (k != string::npos)
- {
- str.insert (k+1,"...");
- pos = k+3;
- k = str.find (".",pos);
- cout << str << endl;
- }
- func(str, k, pos);
- }
- int main ()
- {
- setlocale(LC_ALL, "Russian");
- string::size_type k, pos;
- string str;
- getline(cin, str);
- func(str, k, pos);
- cout << str << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement