+ 1

How to generate a line per 5 letters with for loop?

I use method System.out.print() to print alphabet in for loop. And I want to print multiple lines,5 letters within each line.

17th Sep 2017, 8:16 AM
EricWu2
1 Answer
+ 1
You could have something like this: If (i%5==0){System.out.println("");} in your for loop (where I is counter).
17th Sep 2017, 8:24 AM
Damir