My 99 Bottles of Beer

Just before go to bed.. here is my version of 99 bottles of beer with C++ taste.

And don’t laugh, I know this is very simple.

//compile with gcc or g++
#include <iostream>
using namespace std;
string s(int i)
{return (i>1?"s":"");}
int main()
{
        const int NINE9=99;
        for (int i=NINE9;i>0;i–) {
          cout << i << " Bottle" << s(i) << " of beer on the wall, " <<
                i << " bottle" << s(i) << " of beer." << endl;
          cout << "Take one down and pass it around, ";
          if (i==1) cout << "no more"; else cout <<(i-1);
          cout << " bottle" << s(i-1) << " of beer on the wall." <<
                endl << endl;
        }
        cout << "No more bottles of beer on the wall, no more bottles of beer." << endl;
        cout << "Go to the store and buy some more, " << NINE9
                << " bottles of beer on the wall." << endl;
        return 0;
}

And here is my 99 of anak ayam.. now in C beauty style o_O ;p

#include <stdio.h>
#define e 99
#define o_O {
#define u "satu "
#define c for
#define s "habis "
#define a int
#define O_Ov {
#define t "tinggal "
#define q "%s"
#define T_T ;
#define p "%d\n"
#define v "mati "
#define f ,
#define os "semua.\n"
#define oO ;
#define hm main
#define _o )
#define z printf
#define w "turun "
#define oo "%d, "
#define bye return
#define o 1
#define __ ;
#define GBU 0
#define Oo ?
#define oOo :
#define hm main
#define _ }
#define O 0
#define y "anak "
#define O_o >
#define o_ (
#define x "ayam "
a hm o_ _o O_Ov a b T_T c o_ b=e oO b O_o O __ b– _o o_O z o_ y x w oo v u f b _o oO z o_
q f b O_o o Oo t oOo s os _o oO z o_ p f b O_o o Oo b-o oOo O _o oO _ bye GBU oO _

Leave a Reply