Little_C
11-13-2003, 07:11 PM
Contest:
Write a program(any language) that:
1. Gets input from the user, four numbers from 1 to 500,000.
2. Creates random numbers (the winning numbers) and sees how many lottery tickets that person would buy to win the lottery.
3. There is no #3
Any extras can be thrown in, too.
Here's my entry, in good ol' MetaL:
'Lottery
cls:x=0
randomize timer
print "Pick four number between 1 and 500000"
input Zeus
input Ares
input Apollo
input Mars
a=random(500000)
b=random(500000)
c=random(500000)
d=random(500000)
cls
DO UNTIL Zeus=a and Ares=b and Apollo=c and Mars=d
keymap scan
locate 1,1
print "Purchased ";:? x;:? " lottery tickets"
x=x+1
if keymap key("q") or keymap key("Q") then goto outofloop
LOOP:cls
outofloop:
print "You have won the jackpot! ";:? "Too bad it took ";:?x;:? " Times!"
Output can be included, if you want (i'll have mine up in a little while).
Any complaints (Tygur, I know i'll be hearing from you, lol, j/k) can be posted below.
Write a program(any language) that:
1. Gets input from the user, four numbers from 1 to 500,000.
2. Creates random numbers (the winning numbers) and sees how many lottery tickets that person would buy to win the lottery.
3. There is no #3
Any extras can be thrown in, too.
Here's my entry, in good ol' MetaL:
'Lottery
cls:x=0
randomize timer
print "Pick four number between 1 and 500000"
input Zeus
input Ares
input Apollo
input Mars
a=random(500000)
b=random(500000)
c=random(500000)
d=random(500000)
cls
DO UNTIL Zeus=a and Ares=b and Apollo=c and Mars=d
keymap scan
locate 1,1
print "Purchased ";:? x;:? " lottery tickets"
x=x+1
if keymap key("q") or keymap key("Q") then goto outofloop
LOOP:cls
outofloop:
print "You have won the jackpot! ";:? "Too bad it took ";:?x;:? " Times!"
Output can be included, if you want (i'll have mine up in a little while).
Any complaints (Tygur, I know i'll be hearing from you, lol, j/k) can be posted below.