### Program homework help (C++)

Assignment:

I'm not sure as to how I will get the second set of discounts to work. I am quite new to C++. I have below what I think should do it but I cannot get this to work. Also I am unsure where my brackets should be placed. Any help at all would be greatly appreciated.

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081`` `````` #include using namespace std; int main() { //Declare Variables double discount; double cfdiscount; double lldiscount; double mmdiscount; double total; char person; int coffee, latte, mocha; int totaldrinks; double subtotal; double aftervolume5; const double DISCOUNT1 = .03; const double DISCOUNT2 = .05; const double DISCOUNT3 = .1; const double DISCOUNT4 = .15; const double DISCOUNT5 = .2; //Prompt if student or faculty cout << "Input a S if customer is a student or F if customer is faculty: "; cin >> person; cout << "Enter the amount of coffees, lattes, and mochas the customer has ordered: "; cin >> coffee >> latte >> mocha; //Calculation for the total for the drinks totaldrinks = (coffee * 1.35) + (latte * 3.15) + (mocha * 3.45); //Calculations for subtotal subtotal = totaldrinks - discount; //Calculation for total before tax total = subtotal - cfdiscount - lldiscount - mmdiscount; // Configuring volume discount if(totaldrinks < 20) discount = DISCOUNT1 * totaldrinks; cout << subtotal << "after your 3% discount" << endl; else if(totaldrinks >= 20 && totaldrinks < 40) discount = DISCOUNT2 * totaldrinks; cout << subtotal << "after your 5% discount" << endl; else if(totaldrinks >= 40 && totaldrinks <=60) discount = DISCOUNT3 * totaldrinks; cout << subtotal << "after your 10% discount" << endl; else if(totaldrinks > 60 && totaldrinks <=75) discount = DISCOUNT4 * totaldrinks; cout << subtotal << "after your 15% discount" << endl; else(totaldrinks > 75); discount = DISCOUNT5 * totaldrinks; cout << subtotal << "after your 20% discount" << endl; //configuring power drinker discount if(coffee > 60) cfdiscount = 5; cout << "You are a Caffeine Fiend enjoy a \$5 discount" < 40) lldiscount = 10; cout << "You are a Latte Lover enjoy a \$10 discount" < 50) mmdiscount = 15; cout << "You are a Mocha Monster enjoy a \$15 discount" <
Last edited on
my skype is hepic.hepic
`/*int*/ totaldrinks = (coffee * 1.35) + (latte * 3.15) + (mocha * 3.45);`is obviously incorrect.