Anonymous user
99 bottles of beer: Difference between revisions
→{{header|Perl}}
(added Chapel) |
|||
Line 3,426:
}</lang>
Correct grammar and nice
<lang perl>use 5.10.0;
$num = 99;
my $s = "s" unless ($num == 1); #grammar▼
while ($num > 0) {
print "$num bottle$s of beer on the wall\n";▼
print "Take one down, pass it around\n";▼
$num--;
my $s = "s" unless ($num == 1);
}
say "No more bottles of beer on the wall, no more bottles of beer.";
say "Go to the store and buy some more, 99 bottles of beer on the wall.";</lang>
=={{header|Perl 6}}==
|