Explore BrainMass

C++ String Class Counter

Write function to count the number of sentences entered into a string class. Assume a sentence ends in either a period, question mark or exclamation mark. Count the number of words as well as the sentences and return and average the number of words per sentence. Attached is what I have done so far.


Solution Preview

Dear Student,

You asked regarding number of sentences in a string. And number of words in a string. Average number of words in a sentence, I am attaching a file, please take a look and let me know if you have any questions.

This is the code in the file.

int _tmain(int argc, _TCHAR* ...

Solution Summary

Implementation of problem provided.