// beeralator.cpp #include using namespace std; int main () { char indicator = 'n'; // for the loop float people = 0; float hours = 0; float bottles = 0; float cases = 0; float bph = 0; // beers per hour float peoplehours = 0; // beers * hours * hours float phb = 0; // cas - 1 for every bottle float cas = 0; // peoplehours/beers float pph = 0; // price per head float nettake = 0; // pph * people float prof = 0; // nettake - cost float ppc = 0; // price per case float cost = 0; // cas + total bottle price float ppbottle = 0; float totalbottleprice = 0; do { cout << endl << "Calculate your evening beer requirments...."; cout << endl << "How many beers will you drink in an hour? "; cin >> bph; if(bph == 6) { cout << endl << "Your a lush dude!" << endl; } if(bph >= 7) { cout << endl << "Bring on the comma!" << endl; } if(bph == 2) { cout << endl << "What a chiwowa get of the porch and run with the BIG DOGS!" << endl; } if(bph == 3) { cout << endl << "Keepin it mellow?" << endl; } if(bph == 4) { cout << endl << "Ahh... a nice steady pace." << endl; } if(bph == 5) { cout << endl << "Gonna ty one on!" << endl; } cout << endl << "How many people will be attending? "; cin >> people; if(people <= 3) { cout << endl << "No friends?" << endl; } if(people == 4) { cout << endl << "I hope there all girls..." << endl; } if (people>=10 && people<=100) { cout << endl << "A shindig!" << endl; } if (people>=101 && people<=200) { cout << endl << "Now thats a PARTY!!!" << endl; } if (people>=5 && people<=9) { cout << endl << "A get together" << endl; } if (people >= 201) { cout << endl << "Call in the gaurd!!!" << endl; } cout << endl << "How many hours do you plan to drink? "; cin >> hours; if(hours >= 10) { cout << endl << "The long haul..." << endl; } if(hours <= 2) { cout << endl << "Girls!" << endl; } if(hours == 3) { cout << endl << "Weak" << endl; } if (hours>=4 && hours<=6) { cout << endl << "Respectable." << endl; } if (hours>=7 && hours<=9) { cout << endl << "That should work!" << endl; } cout << endl << "How many bottles have you purchased? "; cin >> bottles; if (bottles <= 1) { cout << endl << "You need to get a couple bottles man." << endl; } if (bottles>=3 && bottles<=6) { cout << endl << "Thats right..." << endl; } if (bottles>=7 && bottles<=9) { cout << endl << "Thats right Thats what Im talking about!!" << endl; } if(bottles >= 10) { cout << endl << "You know how to party!!!" << endl; } cout << endl << "price per bottle? $ "; cin >> ppbottle; cout << endl << "Price per case? $ "; cin >> ppc; cout << endl << "How much will you charge each person? $ "; cin >> pph; peoplehours = hours * (people * bph); cas = peoplehours/24; phb = cas - bottles; nettake = pph * people; totalbottleprice = ppbottle * bottles; cost = (phb * ppc) + totalbottleprice; prof = nettake - cost; cout << endl << "You need atleast " << phb << " casses for the night."; cout << endl; cout << endl << "Your cost or profit would be... $"<< prof << " for the night."; cout << endl; cout << endl << "Do you want to try again (press y to continue)? "; cin >> indicator; } while((indicator=='y') || (indicator=='Y')); return 0; }