I am looking for a way to create a method with the initial state in while loop, which will count the length of each word in a string using I want the output to be something along the lines of:
hello world how are you
There are 0 words of length 0
There are 0 words of length 1
There are 0 words of length 2
There are 3 words of length 3
There are 0 words of length 4
There are 2 words of...
User Profile
Collapse
-
count the length of each word in a string
Last edited by Rabbit; Aug 5 '14, 03:49 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
No activity results to display
Show More