If you do, I need help
I'm doing a project for my programming class and can't seem to figure out how to put the idea into code. I want to make a game where a random number comes up from 1-20, exclusive, and the person has to guess whether the next one will be higher or lower.
This is what I have so far lol.....
Code:
import java.util.*;
import javax.swing.*;
public class Extra_Credit {
public static void main(String[] args) {
int count=0; // how many correct ans
int max = 10; //max num of questions
int index = 0; //to choose question
Random r = new Random();
Integer[] numbers={
new Integer(1),
new Integer(2),
new Integer(3),
new Integer(4),
new Integer(5),
new Integer(6),
new Integer(7),
new Integer(8),
new Integer(9),
new Integer(10),
new Integer(11),
new Integer(12),
new Integer(12),
new Integer(13),
new Integer(14),
new Integer(15),
new Integer(16),
new Integer(17),
new Integer(18),
new Integer(19),
new Integer(20)};
}
}