-->
procedure general_fizz_buzz(integer lim, sequence words, facts)
for i=1 to lim do
string word = ""
for j=1 to length(facts) do
if remainder(i,facts[j])=0 then
word &= words[j]
end if
end for
if length(word)=0 then
word = sprintf("%d",i)
end if
printf(1,"%s\n",{word})
end for
end procedure
general_fizz_buzz(20, {"Fizz","Buzz","Baxx"}, {3,5,7})