Advertisement
Phr0zen_Penguin

99 Bottles of Beer

Dec 21st, 2013
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.38 KB | None | 0 0
  1. /*============================================================================
  2.   ----------------------------------------------------------------------------
  3.   99_bottles.cpp - 99 Bottles of Beer Lyrics.
  4.         (c) Damion 'Phr0z3n.dev' Tapper, 2013.
  5.         Email: Phr0z3n.Dev@Gmail.com
  6.   ----------------------------------------------------------------------------
  7.   ============================================================================*/
  8. #include <iostream>
  9.  
  10. using namespace std;
  11.  
  12. int main()
  13. {
  14.     cout << ">>------------------> 99 Bottles Of Beer Lyrics <------------------<<" << endl << endl;
  15.  
  16.         for(int bottles_of_beer = 99; bottles_of_beer > 0; bottles_of_beer--)
  17.         {
  18.             cout << bottles_of_beer << " bottle";
  19.  
  20.                 if(bottles_of_beer != 1)
  21.                     cout << "s";
  22.  
  23.             cout <<" of beer on the wall, " << bottles_of_beer << " bottle";
  24.  
  25.                 if(bottles_of_beer != 1)
  26.                     cout << "s";
  27.  
  28.             cout << " of beer." << endl;
  29.             cout << "Take one down and pass it around, ";
  30.  
  31.                 if((bottles_of_beer - 1) != 0)
  32.                     cout << bottles_of_beer - 1;
  33.                 else
  34.                     cout << "no more";
  35.  
  36.             cout << " bottle";
  37.  
  38.                 if((bottles_of_beer - 1) != 1)
  39.                     cout << "s";
  40.  
  41.             cout << " of beer on the wall." << endl << endl;
  42.         }
  43.  
  44.     cout << "No more bottles of beer on the wall, no more bottles of beer." << endl;
  45.     cout << "Go to the store and buy some more, 99 bottles of beer on the wall.";
  46.  
  47.     return 0;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement