Skip to content

Commit

Permalink
Update ex3_10.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooophy committed Jun 19, 2015
1 parent 4ad7d71 commit 6c06847
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions ch03/ex3_10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ using std::endl;

int main()
{
string s;
cout << "Enter a string of characters including punctuation." << endl;
while (getline(cin, s))
{
for (auto i : s)
if (!ispunct(i)) cout << i;
cout << endl;
}
cout << "Enter a string of characters including punctuation." << endl;
for (string s; getline(cin, s); cout << endl)
for (auto i : s)
if (!ispunct(i)) cout << i;

return 0;
return 0;
}

0 comments on commit 6c06847

Please sign in to comment.