100 little bugs in the code,
100 bugs in the code,
fix one bug, compile it again,
101 little bugs in the code.
101 little bugs in the code.....
(Repeat until BUGS = 0)
program drinkingsong;
var
numbugs: integer;
begin
numbugs:= 100;
while (numbugs <> 0) do
begin
writeln(numbugs, 'little bugs in the code,');
writeln(numbugs, 'bugs in the code,');
writeln('fix one bug, compile it again,');
numbugs:= (random - 15);
writeln((numbugs), 'little bugs in the code.');
end;
end.
#include <iostream>
#include <random>
main();
main(){
int num_bugs = 100;
double long Rand;
while (num_bugs != 0){
cout
<< num_bugs
<< " little bugs in the code,"
<< endl
<< num_bugs
<< " bugs in the code."
<< endl
<< "fix one bug, compile it again,"
<< endl;
Rand = RandomLong(0, num_bugs+1);
num_bugs = Rand;
cout
<< num_bugs
<< " little bugs in the code."
<< endl;
}
}
#!/usr/local/bin/perl
use strict;
my( $bugs ) = 100;
while( $bugs != 0 )
{
print
(
"$bugs little bugs in the code\n",
"$bugs bugs in the code.\n",
"fix one bug, compile it again,\n"
);
$bugs = rand( 0, $bugs+1 );
print( "$bugs little bugs in the code\n\n" );
}
