Thanks Grog!
I understand it now that someone's put the code in front of me!
I've had a go at for/next, already, but couldn't seem to get it to work. You're a great help.
I've re-edited to code to take the text out of (large texted) graphics mode. Here it is...
n.b. I'm using DBPv5.9
dim max(6,1)
max(0,1)=1
max(1,0)=2
max(1,1)=5
max(2,0)=6
max(2,1)=10
max(3,0)=11
max(3,1)=20
max(4,0)=21
max(4,1)=25
max(5,0)=26
max(5,1)=50
max(6,0)=51
max(6,1)=100
_top:
number=rnd(100)
cls
for t=0 to 6
if number=>max(t,0) and number<=max(t,1)
print (number); "% is "; (max(t,0));"-";(max(t,1))
endif
next t
wait key
goto _top
I tried BBC Basic 20 years ago...