-
-
Save spierceVR/db9d5522f0998b450912631e9e2fef41 to your computer and use it in GitHub Desktop.
Pringle fizzbuzz
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
1 0 # set flag 1, set i 0 | |
loop { | |
1 + # increment i | |
dup 3 % 0 = if { # if div by 3 print Fizz | |
"Fizz" print | |
swap pop 0 swap # set flag false | |
} | |
dup 5 % 0 = if { # if div by 5 print Buzz | |
"Buzz" print | |
swap pop 0 swap # set flag false | |
} | |
swap dup if { # if flag print | |
swap | |
dup print | |
swap | |
} | |
swap | |
" | |
dup 100 = if {break} | |
swap pop 1 swap # set flag true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment