On 28 Nov 2010, at 14:51, Laurence Reeves wrote: > Tony Firshman wrote: >> Marcel Kilgus wrote, on 26/Nov/10 17:02 | Nov26: >>> Marcel Kilgus wrote: >>>> 1for i=1to 100 >>>> 2a$="":if i mod 3=0:a$="FIZZ" >>>> 3if i mod 5=0:a$=a$&"BUZZ" >>>> 4print i,a$:next i >>>> >>>> (91 bytes including 4 LF) >>> >>> Damn, missed something: >>> >>> 1for i=1to 100 >>> 2a$="":if i mod 3=0:a$="FIZZ" >>> 3if i mod 5=0:a$=a$&"BUZZ" >>> 4print i,a$:next >>> >>> (89 bytes including 4 LF) >> >> 1i=i+1 >> 2a$="":if i mod 3=0:a$="FIZZ" >> 3if i mod 5=0:a$=a$&"BUZZ" >> 4print i,a$:goto 1 >> >> 82 bytes incl LF >> >> and CTRL SPACE after 100. >> >> This meets all Rich's requirements: >> ---------- >> The rules are simple - >> write out the values 1 to 100 on screen >> If the value is divisible by 3 write 'FIZZ' after the number >> If the value is divisible by 5 write 'BUZZ' after the number >> If the value is divisible by 3 and 5 write 'FIZZBUZZ' after the number >> ---------- >> Nothing about having to stop at 100 (8-)# >> >> Tony >> > 1PRINT CHR$(RND(TO 255)):GO TO 1 > > (It might take a little while...) >
RND(TO 255) doesn't work for me. Try RND(4 TO 90) - only one character more: and it works! George _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
