import std.stdio; import std.string; void main() { int bottles = 99; char[] text = "99 bottles"; while (bottles != 0) { writefln(text, " of beer on the wall,"); writefln(text, " of beer."); writefln("Take one down, pass it around,"); if (--bottles == 1) { text = "1 bottle"; } else { text = format("%d bottles", bottles); } writefln(text, " of beer on the wall.\n"); } }