Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <iostream>#include <string>#include <sstream>#include <vector>using namespace std;int main(){string line;while (getline(cin, line)){string spaceLine;for (char c : line){if (c >= 'A' && c <= 'Z')c = c - 'A' + 'a';if (c == ',' || c== '.')spaceLine.push_back(' ');spaceLine.push_back(c);}vector<string> words;stringstream ss;ss << spaceLine;string word;while (ss >> word){words.push_back(word);}bool first = true;