Whenever I run this code:
package jmv;
public class euler3 {
int x=0;
public static void main(String[] args) {
for (int x=0 ; x < 6008 ; x++){
if(6008 % x == 0){
System.out.println(x);
}
}
}
}
I receive this error:
Exception in thread "main" java.lang.ArithmeticException: / by zero
at euler2.euler2.main(euler2.java:7)
What does this mean and how do I fix it?