Discuss the below:
Q: 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