Outputting 6 numbers per line from a loop

I'm trying to write a very basic code (early stages of learning java) that takes takes a number (done by manually editing the code, per teacher's request (i.e. no scanner)) and then prints all of it's multiples up to a certain max (also something imputed manually in the code). I have the code working for the loops, values, etc. - it's just that we have to include 2 ways to print it. One way is easy, with each number on a new line. The other way is much harder - each line has 6 numbers, right intended, separated by a few spaces. I know that %(x/y/z/a/b/c)f will print strings/ints/doubles/etc. right justified with spacing based on the x/y/z/a/b/c, but I don't know how to automatically start a new line after 6 numbers.