Writing x ammount of numbers is easy, just line up commands. What you want to do it write 'n' x ammount of times. Its a good idea to always think the way you want your program to run, helps a lot.
...