Tony wants to print out the full lyrics to the song "99 Bottles of Beer on the Wall," so he's written the code below. The song is supposed to involve taking down each of the 99 bottles in turn and passing them around until all the bottles have been taken down and passed around.
1 2 3 4 5 6 7 8 9 |
|
What is wrong with his lyrics?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Notice Line 2. This states that the code will only run if the number of beers is greater than one. So the program stops when there's still a bottle of beer on the wall. :D