Piet Souris wrote:Hi Caroline,
what I would advise is to separate the processes of reading your numbers and displaying them. Reading and storing is most important, you could use an array or better a list.
Having your numbers in an easy to manipulate data structure, it is next also easy to go through the data, applying some filter (like prime) and store these as well. Lastly there is the printing.
Can you come up with a method that takes an array or list, and a variable that gives the numbers per line? You have already most of that code working.
Piet Souris wrote: create a List or an array large enough.