Newsgroups: comp.lang.forth
From: Doug Hoffman <glide...@gmail.com>
Date: Sun, 07 Oct 2012 14:45:56 -0400
Local: Sun, Oct 7 2012 2:45 pm
Subject: Re: Fizz Buzz Zoom
Don't think there's anything wrong with your solution.
Here's another one I threw together just now:
: divisible-by? ( n1 n2 -- f f ) \ is n1 divisible by n2?
: fizz ( n -- f ) \ true if divisible
: buzz ( n -- f ) \ true if divisible
: zoom ( n -- f ) \ true if divisible
: run ( n -- )
0 [if]
No doubt someone else has a more clever solution.
-Doug
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||