nafis nibir 6 年之前
父節點
當前提交
7286be9b75
共有 1 個檔案被更改,包括 5 行新增4 行删除
  1. 5
    4
      Main.java

+ 5
- 4
Main.java 查看文件

@@ -14,7 +14,7 @@ public class Main {
14 14
         Random rand = new Random();
15 15
         int answer = rand.nextInt(100) + 0;
16 16
         
17
-        System.out.println("What is your guess?");
17
+        System.out.println("What is your guess?(between 1 and 100, inclusive)");
18 18
         int guess = getNumGuess();
19 19
        
20 20
         boolean game = true;
@@ -51,10 +51,11 @@ public class Main {
51 51
                 guess = getNumGuess();
52 52
             } else {
53 53
                 numGuess++;
54
-              
55
-                System.out.println(sameGuess);
56
-                System.out.println("You got it fam!");
54
+                
55
+                System.out.println("You got it fam! it was " + answer);
57 56
                 System.out.println("You got the answer in " +numGuess+ " tries.");
57
+                System.out.println("Your incorrect guesses: ");
58
+                System.out.println(sameGuess);
58 59
                 game = false;
59 60
             }
60 61
         }