Sunday, 8 September 2013

How can I generate random numbers, but then stop at four in a row in Java?

How can I generate random numbers, but then stop at four in a row in Java?

So in Java, I want to make a program that will ask the user the range of
numbers to randomly generate. The program will then generate, and print,
the random numbers and then stop when it reaches four numbers in a row.
Then I need it to say how many numbers were generated to get the result.
Then I want it run a user-determined number of times and display the
average of numbers that had to be generated before a four of a kind. I
just need help getting started with this. Thanks.

No comments:

Post a Comment