Read a line of text and count how many words it contains (words are separated by one or more spaces).
Input / Output
Input: a line of text. Output: the number of words.
Examples
Input
Hello World
Expected Output
2
Input
This is IEB
Expected Output
3
+ 2 hidden tests checked on Submit.
Main.java is the entry point. Add extra classes for OOP exercises — they compile together.
Run your code to see test results here.