Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
<groupId>io.zipcoder</groupId>
<artifactId>MicroLabs-OOP-TooLargeTooSmall</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.5</version>
</dependency>
</dependencies>


</project>
29 changes: 28 additions & 1 deletion src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -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);
}



}

}