In Java, I have been trying to print the divisibles of the number 5. I got them to print out, but I would like to print four numbers in each line. I am using the following to print out the numbers divided by 5.
System.out.println("\nDivided by 5: ");
for (int i=1; i<100; i++) {
if (i%5==0)
System.out.print(i +", ");
}
What should I format to print four numbers of those divisibles line by line?