-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|449|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Variables


 
Hotshot
Created : 09 April 2015
 
System : Windows
Language : Blitz Max

Lotto Number



Shortest Lotto Number


 

Comments


Thursday, 09 April 2015, 12:46
Jayenkai
You also need to check there's no duplicates along the way, too.
Thursday, 09 April 2015, 12:52
Hotshot
no duplicates along the way.

How would I do that?

It seem would have too many IF Commands for all numbers to stop being duplicates again unless if I was using Arrays to make things easier like

IF J[ i ]=j then j[ i ]=Rnd(49)
Thursday, 09 April 2015, 13:14
Jayenkai
Apologies. I've typed this on my ipad, so it might not work properly!


Thursday, 09 April 2015, 14:45
Hotshot
That is interesting code to learn from.

One things I have notice is you put

Dim Old(10)

Why 10 Array for storing old numbers?
Thursday, 09 April 2015, 15:14
Jayenkai
I always overscale my arrays just a bit, to avoid odd quirky overflow values, but also to allow you to tweak it in the future. Eg, you might want to include a bonus ball, or something like that.