From a6f83b4675e1589c3ac6aeddc3c214428f797b7a Mon Sep 17 00:00:00 2001 From: Freddy Date: Wed, 26 Oct 2022 22:27:34 -0400 Subject: [PATCH] submitting TooLargeTooSmall java --- .DS_Store | Bin 0 -> 6148 bytes pom.xml | 4 ++++ src/.DS_Store | Bin 0 -> 6148 bytes src/main/.DS_Store | Bin 0 -> 6148 bytes src/main/java/Main.java | 45 ++++++++++++++++++++++++++++++++++++++-- 5 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 .DS_Store create mode 100644 src/.DS_Store create mode 100644 src/main/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..21ee187697aa64b1034dce5156cfc8a9b8647629 GIT binary patch literal 6148 zcmeHKL2KJE6n;vw#-pC`e@zV6r!!C7M5ADe8I&7w{6=G*8gn-Z8 zkJ)vVneq6bf(^z=U2`jki(5sBU;*&%8Xkq2k2`6zBN?q^@KnvHA# zg&rfP4wZC8&NX`@w6D(cl{NQva~3>-QS{C zZ#>y(dQETB`y75#)3A)nNzseOr`$SLDvKBODE^cVr-RnBeU+C{nh(dCkS0T(yC5Boh#$)2ri xljE~i!oR@TIIl8zLqSC!#mMEOcnhu#amf{6V6ifY2+Vy5Xc=7L6!@io.zipcoder MicroLabs-OOP-TooLargeTooSmall 1.0-SNAPSHOT + + 19 + 19 + \ No newline at end of file diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..18a2215b6fd9fed0034be431c4a73b4738d35c59 GIT binary patch literal 6148 zcmeHK!AiqG5Z!H~O({YT3OxqA7EP@c#Y>F!;MIs8RBB?22GeY5QgbMUob`wN5`RZ$ zb~gpBo&=FH1G8^4JF{WlhMf#!jJuP5i?KRm%mhU&Rblu>a2<6)O4?Ee9J0b+m{SVji)U1!#oF*(YK7$63I#Q@$97AT^lF;^(B4j5z$ z0BC?&3e4rNKcIyMKu2S)5G){Eg#xNju3HSQI|r`9VcpUGxk44rxO_A0quElK;;Do?VIEvw#g*@a6mtU~S`FiArSV7moT*=A2){rzGxYj`PL~#nRGpS(HUp zT={o$ut5=BgSkd^b-g>bts??<)+2prgPvr9M)aqpKH|NjH@@pKIYBbbST_3 z9^6*$jJq0XBnF6q&kSJi2V!CUKl-`= 0; i--) { + //if guess is correct + if (guess == num) { + System.out.println("Congratulations! The number is " + num); + break; + } + //if you have 0 tries left + if (i == 0) { + System.out.println("Game over :( The number is " + num); + break; + } + //if guess is too low + if (guess > num) { + System.out.println("Too large, try again. You have " + i + " tries left"); + guess = scanner.nextInt(); + //if guess is too high + } else { + System.out.println("Too small, try again. You have " + i + " tries left"); + guess = scanner.nextInt(); + } + } + } } }