1.1-Introductie-Programmeren

Printing with the enhanced for loop

Difficulty: Filled Outlined Outlined

Ask the user to enter a list of words.

Use the enhanced for-loop to print the words with the drawBorderedText method. Come up with a way to distribute the words on the screen. In the example it is determined randomly, but you could also make it depend on the number of letters or the first letter of each word. Or something else.

Example

Input from user:

example

Output in reversed order:

example