So this is what the program looks like that we have to make. What the class has seen so far are methods, randomizers, loops, if/else, arrays and arraylists
Step 1: You give 6 numbers between 1 and 42
Resized to 76% (was 666 x 340) - Click image to enlarge

Step 2: The program goes through all possible outcomes untill all 6 numbers appear at the same time
Resized to 76% (was 659 x 347) - Click image to enlarge

Step 3: It shows how many times the program needed to guess the right numbers
If somebody can make this for me, you have my eternal gratitude. Please, I am extremely desperate at the moment
VulpesPosted Dec 16, 2012, 2:33 PM
'count' is just a variable name but, if you don't like it, change it to something else such as 'n'.
Console.ReadKey() is there to prevent the console from closing before you've had time to read the output. It can be replaced by Console.ReadLine() which requires the enter key, rather than any key, to be pressed.
int.TryParse can be replaced with with either int.Parse or Convert.ToInt32. However, if someone enters a non-number (such as 'abc'), the program will terminate with an exception.
Anyway, here's the revised code:
MikePosted Dec 16, 2012, 1:23 PM
VulpesPosted Dec 16, 2012, 12:04 PM
Note that:
1. As the chances of guessing 6 numbers, between 1 and 42, in the correct order (I assume this is required?) are astronomic, the program is going to take a long time to run - particularly as all guesses have to be printed to the console.
2. I don't speak Dutch so if the translations are horrible, blame Google Translate :)