CJCoding With Joseph
15per day

Word Count and Length Stats

Write a program that reads a line of text into a character array and reports three values:
1) The total number of words
2) The length of the longest word
3) The number of words with length 4 or more

The input may contain extra spaces at the beginning, at the end, or multiple spaces between words. A word is a sequence of non-space characters.

Output the results exactly in this format:
Words: X
Longest: Y
AtLeast4: Z

Expected Output:

Words: 3
Longest: 4
AtLeast4: 1
Topics:
Arrays
๐Ÿ“ฅ Auto-Input:
Dog Cat Fish \n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.