We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d07532b commit d70980dCopy full SHA for d70980d
app/src/main/java/hexlet/code/games/Prime.java
@@ -6,6 +6,7 @@
6
public class Prime {
7
private static final int MIN = 2;
8
private static final int MAX = 1000;
9
+
10
public static void startGame() {
11
12
String[][] roundsData = new String[Engine.ROUNDS][2];
@@ -21,6 +22,9 @@ public static void startGame() {
21
22
}
23
24
public static boolean isPrime(int num) {
25
+ if (num <= 0) {
26
+ return false;
27
+ }
28
for (int i = 2; i <= Math.sqrt(num); i++) {
29
if (num % i == 0) {
30
return false;
0 commit comments