Skip to content

Commit c9bdb5b

Browse files
committed
upd Prime.java
1 parent f3aaffd commit c9bdb5b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/src/main/java/hexlet/code/Prime.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ public class Prime {
77
public static void gameLogic() {
88
Scanner sc = new Scanner(System.in);
99
Random randNum = new Random();
10-
boolean isPrime = true;
1110
Engine.userGreetings();
1211
System.out.println("Answer 'yes' if given number is prime. Otherwise answer 'no'.");
1312
while (Engine.questionCounter != 3) {
1413
int num = randNum.nextInt(2, 1000);
15-
isPrime = true;
14+
boolean isPrime = true;
1615
System.out.println("Question: " + num);
1716
for (int i = 2; i <= Math.sqrt(num); i++) {
1817
if (num % i == 0) {

0 commit comments

Comments
 (0)