Pure Programmer
Blue Matrix


Cluster Map

Project: 99 Bottles of Beer Lyrics

Compute the full lyrics to the song 99 Bottles of Beer. Write a function to print a verse given the verse number. Be sure to handle the special cases when there are just one bottle of beer and no bottles of beer.

See [[99 Bottles of Beer]]

Output
$ g++ -std=c++17 BottlesOfBeerLyrics.cpp -o BottlesOfBeerLyrics -lfmt $ ./BottlesOfBeerLyrics 99 bottles of beer on the wall. 99 bottles of beer. If one of those bottles should happen to fall. 98 bottles of beer on the wall. 98 bottles of beer on the wall. 98 bottles of beer. If one of those bottles should happen to fall. 97 bottles of beer on the wall. ... 2 bottles of beer on the wall. 2 bottles of beer. If one of those bottles should happen to fall. 1 bottle of beer on the wall. 1 bottle of beer on the wall. 1 bottle of beer. If one of those bottles should happen to fall. No bottles of beer on the wall.

Solution