1.1-Introductie-Programmeren

Printing loads of numbers

Difficulty: Filled Filled Outlined

Create a program that literally allows you to print a massive amount of numbers on the screen. Note that you’ll have to implement some kind of word-wrap in your program to make it readable.

You can use the String.format method like String formattedString = String.format("%3d", someIntVariable);. This will make sure that whenever you print formattedString all numbers will have a similar size (of 3 wide). The easies way of aligning the individual lines is just to count how many you print each line. The example shows 25 numbers on each line.

To help you out, we have given you a method that can generate a random list of numbers of any given length, with values ranging between 0-100.

Examples

Example