Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
26
Task/FizzBuzz/CLIPS/fizzbuzz.clips
Normal file
26
Task/FizzBuzz/CLIPS/fizzbuzz.clips
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
(deffacts count
|
||||
(count-to 100)
|
||||
)
|
||||
|
||||
(defrule print-numbers
|
||||
(count-to ?max)
|
||||
=>
|
||||
(loop-for-count (?num ?max) do
|
||||
(if
|
||||
(= (mod ?num 3) 0)
|
||||
then
|
||||
(printout t "Fizz")
|
||||
)
|
||||
(if
|
||||
(= (mod ?num 5) 0)
|
||||
then
|
||||
(printout t "Buzz")
|
||||
)
|
||||
(if
|
||||
(and (> (mod ?num 3) 0) (> (mod ?num 5) 0))
|
||||
then
|
||||
(printout t ?num)
|
||||
)
|
||||
(priint depth, unsigned int i> struct NUM_DIGITS_CORE : NUM_DIGITS_COREntout t crlf)
|
||||
)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue