-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathMain.java
More file actions
37 lines (28 loc) · 925 Bytes
/
Main.java
File metadata and controls
37 lines (28 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import java.util.Random;
import java.util.Scanner;
/**
* Created by iyasuwatts on 10/17/17.
*/
public class Main {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
System.out.println("Hey! Guess a mystery number: ");
int guess = scan.nextInt();
//Random random = new Random();
//int guess = random.nextInt();
//Need to create an int arr
int correctGuess = 4;
int counter = 0;
int[] hold = new int[guess];
if (correctGuess < guess) {
System.out.println("too small");
counter++;
} else if (correctGuess >= guess) {
System.out.println("too large");
counter++;
} else if (guess < correctGuess) {
System.out.println("correct guess");
}
System.out.println(counter);
}
}