An Example Program
int main() {int wordCount = 0;double totalWordLen = 0;double totalSenCount = 0;string word;while (cin >> word) { int wordLen = word.length(); wordCount++; if (word[wordLen-1] == '.') { totalWordLen += (wordLen-1); totalSenCount++; } else { totalWordLen += wordLen; }}