Question: Write a program that calculates the average word length for a sentence: Enter a sentence: It was deja vu all over again. Average word length:
Write a program that calculates the average word length for a sentence: Enter a sentence: It was deja vu all over again. Average word length: 3.4 For simplicity, your program should consider a punctuation mark to be part of the wor to which it is attached. A new line character can be used to mark the end of the sentenc Display the average word length to one decimal place. Hint: please use getchar to read user's input. #include int main O I/ Write your code here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
