home *** CD-ROM | disk | FTP | other *** search
- 1 rem ==================================
- 2 rem commodares problem #43-3 :
- 3 rem random order
- 4 rem solution by
- 5 rem jim speers
- 6 rem ==================================
- 100 input"[147]lower limit";l:l=int(l+.5)
- 110 input"upper limit";h:h=int(h+.5)
- 120 if h<l then t=h : h=l : l=t
- 130 w=h-l+1 : dim n(w-1) : for i=1 to w
- 140 x=int(rnd(1)*w)
- 150 if n(x)=0 then 180
- 160 x=x+1 : if x=w then x=0
- 170 goto 150
- 180 n(x)=1 : print x+l;
- 190 next i
-