Абу Антось (syarzhuk) wrote,
Абу Антось
syarzhuk

This journal has been placed in memorial status. New entries cannot be posted to it.

FizzBuzz in QB

Народ выйобваецца на хаскелях і рубях, піша FizzBuzz
А на родным кьюбасіку ўсё лягчэй!

10 DATA "", "", "Fizz", "", "Buzz", "Fizz", "", "", "Fizz", "Buzz", "", "Fizz", "", "", "FizzBuzz"
20 DIM A$(15)
30 FOR I = 1 TO 15
40    READ A$(I)
50 NEXT I
60 FOR I = 1 TO 100
70    j = I MOD 15
80    IF A$(j) <> "" THEN PRINT A$(j) ELSE PRINT I
90 NEXT I
Tags: Праграмізм
Subscribe

  • Граблі strike back

    Why would this code StartDelay := GetTickCount(); repeat Application.ProcessMessages; until (abs((GetTickCount() - StartDelay))) >= PauseLength;…

  • Funny bug

    You would think that "next line" after the condition that raises an error would be the line after "End If", not the one right after "Then"... On…

  • Ruby was made by Microsoft!

    Ruby was made by Microsoft! In 1990!

  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 7 comments