Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/General-FizzBuzz/Red/general-fizzbuzz.red
Normal file
14
Task/General-FizzBuzz/Red/general-fizzbuzz.red
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Red ["FizzBuzz"]
|
||||
|
||||
nmax: to-integer ask "Max number: "
|
||||
while ["" <> trim rule: ask "New rule (empty to end): "][
|
||||
append rules: [] load rule
|
||||
]
|
||||
repeat n nmax [
|
||||
res: copy ""
|
||||
foreach [x blah] rules [
|
||||
if n % x = 0 [append res blah]
|
||||
]
|
||||
print either empty? res [n] [res]
|
||||
]
|
||||
halt
|
||||
Loading…
Add table
Add a link
Reference in a new issue