Skip to content

Instantly share code, notes, and snippets.

@JossWhittle
Created August 10, 2012 00:52
Show Gist options
  • Save JossWhittle/3309743 to your computer and use it in GitHub Desktop.
Save JossWhittle/3309743 to your computer and use it in GitHub Desktop.
public void p5() {
int i = 2540;
int[] check = {3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19};
boolean search = true;
while (search) {
boolean test = true;
for (int j = 0; j < check.length; j++) {
if (i % check[j] != 0) {
test = false;
j = check.length;
}
}
if (test) {
System.out.println(i);
search = false;
}
i += 20;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment