Advertisement
konalisp

99 Bottles of REEB

Apr 11th, 2014
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main (int argc, char **argv) {
  5.     bool _ = true;
  6.     int REEB = 99;
  7.     for (;_;) { //I don't want to loop forever...
  8.         cout << REEB << " bottle" << (REEB > 1 ? "s" : "") << " of beer on the wall! "
  9.              << REEB << " bottle" << (REEB > 1 ? "s" : "") << " of beer!" << endl
  10.              << "Take one down, pass it around, ";
  11.         REEB -= 1;
  12.         if (REEB == 0) {
  13.             cout << "no more bottles of beer on the wall!" << endl;
  14.             break; //I'LL BREAK THIS LOOP DEAD
  15.         }
  16.         cout << REEB << " bottle" << (REEB > 1 ? "s" : "") << " of beer on the wall!" << endl;
  17.        
  18.     }
  19.     goto D; //go to the D
  20.     D: //oh no it's over
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement