
-----------------------------------
upthescale
Mon May 29, 2006 8:41 pm

Card Program
-----------------------------------
I would like to randomize 4 suits in cards:


var suits : array 1 .. 4 of string := init ("Spades", "Diamonds", "Clubs", "Hearts")
for i : 1 .. 1
    put suits (i)
end for


it will put spades evertime, how cna i randomize the 4 suits?

-----------------------------------
HellblazerX
Mon May 29, 2006 8:50 pm


-----------------------------------
Just use Rand.Int.
put suits (Rand.Int (1,4))

-----------------------------------
Clayton
Mon May 29, 2006 9:09 pm


-----------------------------------
upthescale, you are more than capable of doing the solution to your problem, plz dont post questions until you have thouroughly(sp?) thought the question through first, then post if you are still having problems

-----------------------------------
upthescale
Mon May 29, 2006 9:26 pm


-----------------------------------
hey, i did try fer about 120 minutes cept i was doing

randint ferst, it wudnt werk, but i had to use Rand.Int isntead

-----------------------------------
Clayton
Mon May 29, 2006 9:31 pm


-----------------------------------
u know how to use randint, and Rand.Int, just take what you know and expand
