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: | (2.27 in 26 votes) |
/* 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 |
---|---|---|---|---|
object-oriented version | Tim Robinson | 04/20/05 | 4 | |
hacking style | Tim Robinson | 04/20/05 | 14 | |
extreme template metaprogramming | Richard Wolf | 04/20/05 | 5 | |
meta programming | Arion Lei | 04/20/05 | 5 | |
Preprocessor & self-include recursion | Chocapic | 02/27/07 | 6 | |
feature creep | Jono | 04/27/09 | 1 | |
most extreme template metaprogramming | Henrik Theiling | 12/04/11 | 0 | |
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
Pulseczar said on 07/29/06 08:38:27
the fug?
dj alejo said on 07/27/09 10:57:05
Indeed, it's no obfuscated. It's more like usual code with an unusual identation.
Lurveleven said on 05/31/10 12:06:23
Far from giving the correct output.
barrym said on 06/02/10 04:44:38
I agree with Lurveleven.
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.