RosettaCodeData/Task/FizzBuzz/Forth/fizzbuzz-2.fth

10 lines
218 B
Forth
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
: .fizzbuzz ( n -- )
0 pad c!
dup 3 mod 0= if s" Fizz" pad place then
dup 5 mod 0= if s" Buzz" pad +place then
pad c@ if drop pad count type else . then ;
: zz ( n -- )
1+ 1 do i .fizzbuzz cr loop ;
100 zz