Question: Trying to do this in C++ Question 7: Write a program that will read in a line of text and output the number of words
Trying to do this in C++

Question 7: Write a program that will read in a line of text and output the number of words in the line and the number of occurrences of each letter. Define a word to be any string of letters that is delimited at each end by either whitespace, a period, a comma, or the beginning or end of the line. You can assume that the input consists entirely of letters, whitespace, commas, and periods When outputting the number of letters that occur in a line, be sure to count upper and lowercase versions of a letter as the same letter. Output the letters in alphabetical order and list only those letters that do occur in the input line. Your program should interact with the user exactly as it shows in the following example: Please enter a line of text: I say Hi words Notes: 1. Think how to break down your implementation to functions. 2. Pay attention to the running time of your program. If the input line contains n characters, an efficient implementation would run in a linear time (that is (n)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
