„99 Bottles of Beer”
Piosenka „99 Bottles of Beer” jest utworem anglojęzycznym, który zazwyczaj śpiewany jest podczas długich podróży, aby „zabić czas”.
99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around – 98 bottles of beer on the wall.
98 bottles of beer on the wall, 98 bottles of beer. Take one down and pass it around – 97 bottles of beer on the wall.
…
2 bottles of beer on the wall, 2 bottles of beer. Take one down and pass it around – 1 bottle of beer on the wall.
1 bottle of beer on the wall, 1 bottle of beer. Take it down and pass it around – no more bottles of beer on the wall.
Każda zwrotka, z wyjątkiem ostatniej, różni się jedynie liczbą butelek piwa. Istnieje wiele wersji tej piosenki. Niektórzy dodają na końcu dodatkowy wers, który pozwala na rozpoczęcie śpiewania od nowa:
No more bottles of beer on the wall, no more bottles of beer. Go to the store and buy some more, 99 bottles of beer on the wall.
Generowanie tego tekstu jest jednym z klasycznych zadań, które wykorzystuje się do demonstrowania składni różnych języków programowania.
Przykłady w programowaniu
Język Pascal
Język C++
Język C#
bash
Python
JavaScript
Zobacz też
Hello world
Linki zewnętrzne
99 Bottles of Beer w ponad 1000 języków programowania (ang.)