class BEERS
create
make
feature
make is
local
i: INTEGER;
btl: STRING
do
from
i := 9
until
i = 0
loop
io.put_new_line;
if i = 1 then
btl := " bottle"
else
btl := " bottles"
end;
io.put_integer (i);
io.put_string (btl);
io.put_string (" of beer on the wall, ");
io.put_integer (i);
io.put_string (btl);
io.put_string (" of beer.");
io.put_new_line;
io.put_string ("Take one down and pass it around, ");
i := i - 1;
io.put_integer (i);
if i = 1 then
btl := " bottle"
else
btl := " bottles"
end;
io.put_string (btl);
io.put_string (" of beer on the wall. ");
io.put_new_line
end;
io.put_string ("%N%NGo to the store and buy some more,");
io.put_new_line;
io.put_string ("9 bottles of beer on the wall.");
io.put_new_line
end;
end -- class BEERS