diff --git a/pom.xml b/pom.xml index 1efac6c..a26ff00 100644 --- a/pom.xml +++ b/pom.xml @@ -7,6 +7,13 @@ io.zipcoder MicroLabs-OOP-TooLargeTooSmall 1.0-SNAPSHOT + + + commons-lang + commons-lang + 2.5 + + \ No newline at end of file diff --git a/src/main/java/Main.java b/src/main/java/Main.java index 05e41a9..5dcb98d 100644 --- a/src/main/java/Main.java +++ b/src/main/java/Main.java @@ -1,9 +1,36 @@ +import java.util.Scanner; + /** * Created by iyasuwatts on 10/17/17. */ public class Main { + + public static void main(String[] args){ - + Scanner Number = new Scanner(System.in); + + int num1 = (int) (Math.random() * 100); + int guess = 5; + int i, tryMe; + System.out.println("Guess a number! Any number!"); + for( i = 0; i < guess; i++) { + tryMe = Number.nextInt(); + if (num1 == tryMe) { + System.out.println("You got it dude!"); + } else if (num1 > tryMe) { + System.out.println("Too small!"); + } else if (num1 < tryMe) { + System.out.println("Too big!"); + } + + }if (i == guess) + {System.out.println("Better luck next time!"); + System.out.println("The number was " + num1); + } + + + } + }