thank you all very much for your help, but i still need more!!!
i did what daemon said to do (making minor adjustments along the way such as how many boxes, the values, etc) and it works, but sometimes one of the values is diaplayed as £0.00 and also the three lowest values (which are £0.01, £0.10 and £0.50) display as £0.00 on every box except the first three!!!
for example:
Box 1 contains £0.01
Box 2 contains £0.00 (should be £10.00)
Box 3 contains £250.00
Box 4 contains £50000.00
...
Box 19 contains £1000.00
Box 20 contains £0.00 (should be £0.50)
Box 21 contains £250000.00
Box 22 contains £0.00 (should be £0.10)
i will send the code. please could you help me put it right?
`setup
sync on
sync rate 0
hide mouse
randomize timer()
dim money(22)as integer`possible values
`look up data commands for more explanation on this
restore pv
`fill the possible value's array. It is in numberical order
for i=1 to 22
read money(i)
next i
`make it random
`it does the following 10 times
for shuffle=1 to 10
`chooses 2 random positions
p1=rnd(22)
p2=rnd(22)
`stores the dollar amounts of the two random spots
temp1=money(p1)
temp2=money(p2)
`switch dollar amounts in bags
money(p1)=temp2
money(p2)=temp1
next shuffle
`display results on screen
for i=1 to 22
print "Box "+str$(i)+" holds £"+str$(money(i),2)
next i
`wait for user
sync : sync
wait key
`done
end
`possible values for boxes
pv:
data 0.01,0.1,0.5,1,5,10,50,100,250,500,750,1000,3000,5000,10000,15000,20000,35000,50000,75000,100000,250000