### If/Else coupon problem

I've been having a difficult time completing this code and getting it to run properly. I'm a beginner with if/else functions (obviously). Any help or advice is appreciated!

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112`` `````` //this program calculates the price for a child or adult haircut with or without a coupon. A salon offers coupons to its customers time to time. Without coupons adult haircut is 15.50 and //the child haircut is 10.50.Coupons that this salon offers are color coded.The following table //shows the color code and discount information //Color code Discount //Blue(code # 2) 2.59 from adult, 1.50 from kids //Write a C++ program that asks the user to enter the coupon color and the haircut type(adult, kid) //and then determine the haircut charge.It is possible that a customers may not have a coupon, in //that case, no discount will be offered.You can assume that green, blue colors are represented //using 1 and 2 respectively. //Develop a C++ program that implements your algorithm #include #include #include using namespace std; int main() { //set variable cout << fixed << setprecision(0) << setw(3) << endl; float numAdHaircuts, numChdHaircuts, TotPurchase, DiscountCoup = 0; string haveDiscount, DiscountType, coupontype; cout << setprecision(2) << fixed << endl; //get the number of adult haircuts cout << "Enter the number of adult haircuts that are being purchased: "; cin >> numAdHaircuts; //get the number of children's haircuts cout << "Enter the amount of child haircuts that are being purchased: "; cin >> numChdHaircuts; //ask if the user has a discount coupon cout << "Do you have a discount coupon (Y for yes, N for no)? "; cin >> haveDiscount; //if the user has a discount coupon // ask the user for the discount coupon type cout << "Is this discount for an adult or child's ticket (A for adult or C for child)? "; cin >> DiscountType; cout << "Is it a green or blue coupon? (G/B)\n"; cin >> coupontype; //calculate and display total price if ((DiscountType == "A") && (coupontype == "G")) { { DiscountCoup = 3.50; cout << "Discount: " << DiscountCoup << endl; } else if ((DiscountType == "A") && (coupontype == "B")) { { DiscountCoup = 2.59; cout << "Discount: " << DiscountCoup << endl; } } else if ((DiscountType == "C") && (coupontype == "G")) { { DiscountCoup = 2.50; cout << "Discount: " << DiscountCoup << endl; } } else if ((DiscountType == "C") && (coupontype == "B")) { DiscountCoup = 1.50; cout << "Discount: " << DiscountCoup << endl; } else { cout << DiscountCoup << "is an invalid coupon type" << endl; } } //calculate the purchase amount TotPurchase = (numAdHaircuts * 15.50) + (numChdHaircuts * 10.50) - DiscountCoup; cout << "Total Purchase: " << TotPurchase << endl; return 0; }``````
In function 'int main()':
78:2: error: expected '}' before 'else'
33:3: warning: unused variable 'TotPurchase' [-Wunused-variable]
At global scope:
107:2: error: 'TotPurchase' does not name a type
108:2: error: 'cout' does not name a type
111:2: error: expected unqualified-id before 'return'
112:2: error: expected declaration before '}' token

You have mismatched braces. Either setup your editor to do matched braces for you or get into the habit of typing both of them and go back to fill in what's inside the braces.