Voting
Category
real language
Language C++
(hacking style)
| Date: | 04/20/05 |
| Author: | Tim Robinson |
| URL: | n/a |
| Comments: | 5 |
| Info: | n/a |
| Score: |
// C++ version of 99 Bottles of beer
// programmer: Tim Robinson timtroyr@ionet.net
// Corrections by Johannes Tevessen
#include <iostream>
using namespace std;
int main()
{
int bottles = 99;
while ( bottles > 0 )
{
cout << bottles << " bottle(s) of beer on the wall," << endl;
cout << bottles << " bottle(s) of beer." << endl;
cout << "Take one down, pass it around," << endl;
cout << --bottles << " bottle(s) of beer on the wall." << endl;
}
return 0;
}
Download Source | Write Comment
Alternative Versions
| Version | Author | Date | Comments | Rate |
|---|---|---|---|---|
| extreme template metaprogramming | Richard Wolf | 04/20/05 | 5 | |
| meta programming | Arion Lei | 04/20/05 | 2 | |
| ob fuscated | Tapi (Paddy O'Brien) | 08/11/05 | 2 | |
| object-oriented version | Tim Robinson | 04/20/05 | 2 | |
| GUI version | Martyn Davies | 05/28/05 | 0 |
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please use the form to submit new examples!
Comments