added notes to explain IF statement

This commit is contained in:
Cameron Seamons 2026-01-08 00:04:09 -07:00
parent f36c339509
commit 8f0e6c6383

View file

@ -25,6 +25,7 @@ public class GuessANumber {
System.out.print("\nEnter a guess: ");
guess = scanner.nextInt();
// because of how I structured the counting when the user reaches 1 chance left they lost.
if(chances == 1){
System.out.println("\n####### YOU LOSE!!! #######");
System.out.println("--- The number was [ " + number + " ] ---");