1.1-Introductie-Programmeren

Turn around with while

Difficulty: Filled Outlined Outlined

Have the user enter a list of numbers. Obviously we need some way to know when to stop. Use the number 0 (zero) for this purpose. So, if the user enters the number 0 we do not ask for input anymore.

Then print the list of numbers in reverse order. Use while-loop with a counter for this.

Example

Input from user:

example

Output in reversed order:

example