Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string text = "", result = "";
- int lenght, i;
- bool removing;
- setlocale(LC_ALL, "Russian");
- cout << "Введите строку: ";
- getline(cin, text);
- lenght = text.length();
- for (i = 0, removing = false; i < lenght; i++) {
- if (isupper(text[i]))
- removing = true;
- if (!removing)
- result += text[i];
- if (text[i] == ' ')
- removing = false;
- }
- cout << result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement