Question: please do it differently from the ones that are submitted Write a C++ program that asks the user to enter one or more complete sentences

please do it differently from the ones that are submitted

please do it differently from the ones that are submitted Write a

Write a C++ program that asks the user to enter one or more complete sentences and displays the number of words and the number of sentences that were entered by the user. Your program should store the text entered by the user in a char array. Input You can make the following assumptions about user input: 1. The first character that a user types will not be a blank. 2. Each word will be separated by exactly one blank. 3. Each sentence will end with a?, T, or ? 4. The last character that the user types will be a?, ?, or '?'. 5. The user will not enter more than 100 characters. Do not let the user enter nothing. Loop until the string entered by the user is not empty. void Functions Your program should contain a total of four functions including the main function. All functions except the main function are described in the following table: Function Name Description Returns Reads user input and stores the text in a char array. Use the getUserInput cin.getline function to read from the keyboard. Accepts the char array holding the user input as a parameter. int numberOfWords Returns the number of words in the char array. numberOfSentences Accepts the char array holding the user input as a parameter. Returns the number of sentences in the char array. displayOutput Displays the number of words entered by the user. void Output A screenshot of a sample run for this program is shown below. Design your program so it looks exactly like the one shown in the screenshot. int Count Works Enter one or more sentences. Hello! My name is Joh. What is your name? There are words and 3 sentences se the folloxing text: hellet my name is Joh. What is your name? press aty kay te continue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!