Liberty BASIC Community Forum
« Lottery Number Picker Program »

Welcome Guest. Please Login or Register.
Nov 17th, 2017, 1:25pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Lottery Number Picker Program  (Read 541 times)
michael
Guest
xx Lottery Number Picker Program
« Thread started on: Apr 11th, 2015, 01:42am »

Code:
'lottery ticket # generator  Canadian Lottery
print "  LOTTO MAX NUMBER PICKER"
gosub [ROLL]
 print   " THESE ARE YOUR NUMBERS "
 print "   ";a
 print "   ";b
 print "   ";c
 print "   ";d
 print "   ";e
 print "   ";f
 print "   ";g
 wait
 end
[ROLL]
   a=  int(rnd(1)*49) +1
   b=  int(rnd(1)*49) +1
   c=  int(rnd(1)*49) +1
   d=  int(rnd(1)*49) +1
   e=  int(rnd(1)*49) +1
   f=  int(rnd(1)*49) +1
   g=  int(rnd(1)*49) +1
   if a = b or a = c or a = d or a = e or a = f or a = g then goto [ROLL]
   if b = c or b = d or b = e or b = f or b = g then GOTO [ROLL]
   if c = d or c = e or c = f or c = g then GOTO [ROLL]
   if d = e or d = f or d= g then GOTO [ROLL]
   if e = f or e = g then goto [ROLL]
   if f = g then goto [ROLL]
   return
   wait 
« Last Edit: Apr 11th, 2015, 05:11am by Stefan Pendl » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls