[your code here] 99 bottles of beer
Pseudo Nym
pseudonym at example.thisisnotatld
Sun Oct 14 00:44:24 UTC 2018
import std.stdio;
import std.conv;
void main() {
const string drink = "beer";
int bottles = 99;
while (bottles > 0) {
string amt = to!string(bottles);
writeln(amt ~ " bottles of " ~ drink ~ " on the wall, " ~ amt ~
" bottles of " ~ drink ~ ". Take one down, pass it around, " ~
to!string(--bottles) ~ " bottles of " ~ drink ~ " on the wall.");
}
}
More information about the Digitalmars-d
mailing list