File : fizzbuzz.bush
#!/usr/local/bin/bush
-- A common interview test from Rosetta Code for testing basic programming
-- skills.
pragma annotate( "fizzbuzz" );
pragma annotate( "" );
pragma annotate( "Write a program that prints the numbers from 1 to 100. But for multiples of" );
pragma annotate( "three print 'Fizz' instead of the number and for the multiples of five print" );
pragma annotate( "'Buzz'. For numbers which are multiples of both three and five print" );
pragma annotate( "'FizzBuzz'" );
pragma annotate( "translated by Ken O. Burtch" );
procedure fizzbuzz is
begin
for i in 1..100 loop
if i mod 15 = 0 then
? "FizzBuzz";
elsif I mod 5 = 0 then
? "Buzz";
elsif I mod 3 = 0 then
? "Fizz";
else
? i;
end if;
end loop;
end fizzbuzz;