| Category: | Fun Stuff |
| Author/Contact Info | Kevin Cohe |
| Description: | This was my first program. I did it after about an hour or two of reading Learning Perl. I relize there are other programs that do the same thing more efficiently, but this is my first program and I have much to learn. |
#!/usr/bin/perl -w
print "Welcome to 99 bottles of beer on the wall\n";
print "How many bottles of beer do you want on the wall\n";
$beer=<STDIN>;
do{
$beer1=$beer-1;
if($beer1>=0){
print "$beer bottles of beer on the wall, $beer bottles of
beer. Take one down pass it around $beer1 bottles of beer
on the wall\n";
$beer=$beer-1;
}
}while($beer>0);
|
|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: 99 bottles of beer on the Wall
by jeffa (Bishop) on Aug 21, 2002 at 04:35 UTC | |
by mystik (Sexton) on Aug 21, 2002 at 12:33 UTC | |
by Abigail-II (Bishop) on Aug 21, 2002 at 13:11 UTC | |
by ignatz (Vicar) on Aug 21, 2002 at 13:24 UTC | |
by ignatz (Vicar) on Aug 21, 2002 at 13:36 UTC |