Language c++
(ob fuscated)
| Date: | 08/11/05 |
| Author: | Tapi (Paddy O'Brien) |
| URL: | n/a |
| Comments: | 4 |
| Info: | http://www.sgi.com/tech/stl/ |
| Score: |
/* obfuscated 99
bottles program
in c++ coded by
paddy obrien */
#include <iostream>
using namespace std;
void beer(int,int); void
wall(); int main() { int
bottles =99;
while (bottles)
{for(int i=0; i < 2; ++i)
beer( bottles,i); cout <<
"take one down pass it around"
<< endl; beer
(--bottles, 0)
;cout << endl;}
return 0 ;}
void beer (int bottles, int i)
{cout << bottles
<< " bottle(s) of beer ";
if(!i) wall(); else cout <<
endl;} void wall(){ cout
<< "on the wall" <<endl;}
/*Yeah I know it's a sorry
excuse for a bottle
but given how little code was
required it's the best I
could/felt like doing, oh and
by the way all the comments
\are purely filler */
Download Source | Write Comment
Alternative Versions
| Version | Author | Date | Comments | Rate |
|---|---|---|---|---|
| extreme template metaprogramming | Richard Wolf | 04/20/05 | 5 | |
| Preprocessor & self-include recursion | Chocapic | 02/27/07 | 6 | |
| hacking style | Tim Robinson | 04/20/05 | 14 | |
| most extreme template metaprogramming | Henrik Theiling | 12/04/11 | 0 | |
| feature creep | Jono | 04/27/09 | 1 | |
| meta programming | Arion Lei | 04/20/05 | 5 | |
| object-oriented version | Tim Robinson | 04/20/05 | 4 | |
| 8 | Jono | 04/15/09 | 0 | |
| GUI version | Martyn Davies | 05/28/05 | 1 |
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 don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
I humbly suggest that the author fill up the 'bottle' of code with code
that actually outputs the specified song lyrics.
Then maybe the comments could be not only smaller, but more informative.