Question: C only please Question 3 (10 marks). Write a program that prompts the user to enter a sentence (assume that a sentence carn have a

C only please Question 3 (10 marks). Write a program that promptsC only please

Question 3 (10 marks). Write a program that prompts the user to enter a sentence (assume that a sentence carn have a maximum of 50 characters). It then counts the vowels and consonants in it. It also calculates the average word length of the input sentence. Word length is the total number of characters in the sentence divided by the total number of words in it. Words are separated by one or more spaces. All the results are displayed at the end. Please follow the given sample input/output. Hint: use fgets instead of scanf. Call your source code file Name the c file "lastnameFirstnameA2Q3.c". (Ritu's file would be called chaturvediRituA2Q3.c) Sample Input: Enter a sentence: today is thursday Output: Number of vowels in the sentence = 5 Number of consonants in the sentence 10 Average word length: 5.0

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!