mardi 24 juin 2014

Java error in eclipse


Vote count:

0




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?



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire