Guest User

Untitled

a guest
Jan 17th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <cstring>
  4. using namespace std;
  5. int main()
  6. {
  7. setlocale(LC_ALL, "Rus");
  8. cout<<"Введите строку:"<<endl<<endl;
  9. string str, pstr;
  10. getline(cin, str);
  11. int x = sizeof(str);
  12. for(int i = 0; i < x; i++)
  13. {
  14. x = str.find(' ');
  15. pstr = str.erase(x, x);
  16. }
  17. cout<<"Результат: "<<str<<endl;
  18. _getch();
  19. return 0;
  20. }
Add Comment
Please, Sign In to add comment