Write a program that reads five words from the standard input and outputs each word on a new line.
Words can be ordered differently in the input stream.
To solve the problem, use Scanner .
Write a program that reads five words from the standard input and outputs each word on a new line.
Words can be ordered differently in the input stream.
To solve the problem, use Scanner .
Sample Input 1:
This course
teaches you KotlinSample Output 1:
This
course
teaches
you
KotlinSample Input 2:
one two three four fiveSample Output 2:
one
two
three
four
fiveCreate a free account to access the full topic