-
-
Save AMiller42/7219aaca47cc01753084635c49d3b521 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i<-1 | |
})i<100(]i%15|0|''FizzBuzz''->out goto;z;||]i%3|0|''Fizz''->out goto;z;||]i%5|0|''Buzz''->out goto;z;||i->out[[[:z:)i+1(->i{ | |
Readable syntax: | |
i<-1 | |
During)i<100( | |
Compare i%15 | |
Match 0 | |
''FizzBuzz''->out goto;z; | |
Match any | |
Compare i%3 | |
Match 0 | |
''FizzBuzz''->out goto;z; | |
Match any | |
Compare i%5 | |
Match 0 | |
''FizzBuzz''->out goto;z; | |
Match any | |
i->out | |
:z: | |
)i+1(->i Did | |
Indented: Pseudocode: | |
i<-1 i = 1 | |
} )i<100( while i<100 { | |
]i%15 switch i%15: | |
|0| case 0: | |
''FizzBuzz''->out print "FizzBuzz" | |
goto;z; goto :label | |
|| default: | |
]i%3 switch i%3: | |
|0| case 0: | |
''Fizz''->out print "Fizz" | |
goto;z; goto :label | |
|| default: | |
]i%5 switch i%5: | |
|0| case 0: | |
''Buzz''->out print "Buzz" | |
goto;z; goto :label | |
|| default: | |
i->out print i | |
] | |
] | |
] | |
:z: :label | |
)i+1(->i i = i+1 | |
{ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment