Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n;
- char t[256];
- char sp[] = {".,?!"};
- cin >> n;
- cin.get();
- for(int i=0; i<n; i++)
- {
- cin.getline(t, 256);
- for(int i=0; t[i]; i++)
- {
- if((strchr(sp, t[i])) && (i < strlen(t)- 1))
- {
- strcpy(t+i, t+i+1);
- i--;
- }
- }
- cout << t << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement