Consider a sequence of words formed by letters. The words are separated with dashes, which can appear also at the beginning and in the end of the sequence. The sequence ends with a dot.
Your task is to write a program that prints the number of short words (less than five letters), medium (between five and nine letters), and long (more than nine letters).
The input consists of a line with letters and dashes, finished with a dot.
Your program must print a line with the number of short, medium and long words separated by commas.
Using |strings| is not allowed in this problem.
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T10:13:00.086Z
© Jutge.org, 2006–2026.
https://jutge.org