Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- using namespace std;
- int main()
- {
- ifstream cin("input.txt");
- ofstream cout("output.txt");
- const char r = ' ';
- const string z(",.!?");
- string s;
- string str;
- while(getline(cin, str))
- {
- s += str + ' ';
- }
- if(s.length() && s[0] == r)
- s.erase(0, s.find_first_not_of(r));
- cout << s;
- cin.close();
- cout.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement