summaryrefslogtreecommitdiff
path: root/3p10.cpp
blob: 55f931185015ed07edd95e897164f7efebf9c668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>

/*
 *
 * 3.10
 *
 * Not sure if i was supposed to support full sentences with whitespace but i decided to do that because it is a bit nicer.
 */

using std::string;
using std::cout;
using std::cin;
using std::cerr;
using std::clog;
using std::endl;
int main () {

	string Phrase;
	if(getline(cin, Phrase)) {
		for(auto &c : Phrase) {
			if(!ispunct(c)) {
				cout << c;
			}
		}
		cout << endl;
	} else {
		cout << "Error!" << endl;
		return -1;
	}
	
	return 0;
}