Word count

Write an integer function @word_count(s)@ that returns the number of words in string ss. We assume all characters of ss are letters and spaces. Warning: do not use the split string method.

Sample session

Problem information

Author: ProAl

Generation: 2026-01-25T16:56:07.763Z

© Jutge.org, 2006–2026.
https://jutge.org