-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathfizzbuzz.logo
executable file
·25 lines (21 loc) · 977 Bytes
/
fizzbuzz.logo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env logo
; Language: Logo
; Web site: http://ucblogo.sourceforge.net/
; ftp://ftp.cs.berkeley.edu/pub/ucblogo/
; https://packages.ubuntu.com/jammy/amd64/ucblogo/download
; Last tested on: Ubuntu 24.04.2 LTS
; Requires: Build from a modified version of ucblogo-5.6.tar.gz
; from the ftp site to fix a compilation error
; (replace "exp" by "Exp" *except* in math.c).
; An alternative is to download ucblogo_5.5-3_amd64.deb
; from packages.ubuntu.com "dpkg -i ucblogo_5.5-3_amd64.deb"
; On Ubuntu 17.10, `apt-get install ucblogo` installs version 6.0,
; which doesn't work without an X display.
to print_line :i
if [(remainder :i 15) = 0] [print "FizzBuzz stop]
if [(remainder :i 3) = 0] [print "Fizz stop]
if [(remainder :i 5) = 0] [print "Buzz stop]
print :i
end
for [i 1 100 1] [print_line :i]
bye