Hello I have an issue where I have to print out the numbers divisible by 17 but I want to print out 5 numbers and then jump down to the next line. This is the code that I have and don't know why it's not working....
public class seventeen {
public static void main(String[] args) {
int num = 17;
System.out.print("The Numbers Divisible By 17 are: ");
int enter = 0;
for (int x = 1; x <= 10000; x++) {
if (x % num == 0) {
System.out.print(x + " ");
}
enter++;
if (enter == 5) {
enter = 0;
System.out.println();
}
}
}
}