RosettaCodeData/Task/FizzBuzz/Picat/fizzbuzz-5.picat

7 lines
171 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
fb1(I) = V =>
V = I.to_string(),
if I mod 15 == 0 then V := "FizzBuzz"
elseif I mod 3 == 0 then V := "Fizz"
elseif I mod 5 == 0 then V := "Buzz"
end.