Question: Write a program that ask user to enter any sentence, up to a maximum of 50 characters. The program will then tell how many words
Write a program that ask user to enter any sentence, up to a maximum of 50 characters. The program will then tell how many words are in the sentence and how many characters are in the sentence. Do not count the null character. The program will then display the sentence backwards. Program must use one function that will determine how many words are in the sentence and pass this information back via a return value function. For this program we will just define a word to be any sequence of characters delimited by white space characters. So basically count the number of white spaces and increment it by one to give the number of words. c++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
