Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Щеглов В.А. 19ВИ1
- #include <string>
- #include <iostream>
- using namespace std;
- void name(string &s){
- string::size_type position = 0;
- while((position=s.find(92)) != string::npos){
- position=s.find(92);
- s.erase(1,position);
- }
- while((position=s.find('.')) != string::npos){
- position=s.find('.');
- s.erase(position);
- }
- }
- int main()
- {
- setlocale(LC_ALL, "Russian");
- cout << "Enter string s: ";
- string s;
- getline(cin, s);
- s=' '+s;
- name(s);
- cout << "Completed string s: " << s << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment