A lottery program. Good one to learn basic stuff.

So I managed to finish my program that randomizes 7 numbers between 1 to 48 and it checks are they already in use.

I made it for windows. Not hard to port it to linux or something you can do it yourselves. I just used some windows "Sleep" effect to make numbers show up slower.

Made and compiled with Code::Blocks 8.02 with GCC compiler.


There is usage of FOR, SWITCH, RAND() and it is pretty simply made.
Shouldn't be too confusing I hope :S I also added some notes everywhere and DEBUGGER! It should help to understand the program when you run it and choose debug mode.

There is .exe and .cpp files.
http://www.mediafire.com/download.php?mgu2z3m5g1z


I hope someone learns something of it :) I did and a lot!
The actual program isn't that useful though :D Maybe someone could use it to get him/herself lotto numbers without effort? :P

PS. I hope this isn't totally wrong place to post this up.
Last edited on
UK Lottery?? If so - What about number 49 ??
Then you just change the number it passes to the RandomNumber(49, 1)

Btw I noticed I had mistake there. I have RandomNumber(47,1) which means 1-47 not 48.
Topic archived. No new replies allowed.