Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <string>
- #include <math.h>
- #include <algorithm>
- #include <vector>
- #include <set>
- using namespace std;
- int main()
- {
- string s, h = "";
- int i, j;
- bool what = true;
- vector <string> answer;
- while (getline(cin, s))
- {
- if(s.size()!=0)
- for (i = 0; i < s.size(); i++)
- {
- if (s[i] == '.' || s[i] == '?' || s[i] == '!')
- what = true;
- else
- if (s[i] >= 'A'&&s[i]<='Z')
- if (what == false)
- s[i] = s[i] + 32;
- else
- what = false;
- }
- answer.push_back(s);
- }
- if(answer.size()!=0)
- for (i = 0; i <= answer.size() - 1; i++)
- {
- cout << answer[i] << endl;
- }
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment