Need Help with Program!!

Have to write a program using switch that displays:
The store sells chocolates
• Milk Chocolate @ $8.50 per pound
• Dark European Chocolate @ $9.75 per pound
• White Chocolate @ $10.50 per pound
• European Truffles @ $12.50 per pound

The store allows a customer discount based on:
1. $20.00 to $39.99 10% off
2. $40.00 to $59.99 15% off
3. $60.00 to $79.99 20% off
4. $80.00 and over 25% off

Shipping & Handling is 10% of the net total (gross – discount).
Total Owed is Net Total plus Shipping and Handling)

You are using the switch to calculate the quantity discount. Since the switch does not allow a range, you have to set a “code” for the quantity range to use in the Switch such as and integer code 1, 2, 3, or 4 or maybe a char ‘a’, ‘b’, ‘c’ or ‘d’.


This is what i have so far, i know its not much not asking for anyone to do my code, but i've havnt been able to get it down, having trouble with declaring the variables and how to use the switch. Just asking for assistance on how to start the program thank you.

#include <iostream>
#include <conio.h>
using namespace std;

int main ()
{
float mChoc = 8.50, dEChoc = 9.75, wChoc = 10.50, eTruff = 12.50

char choice ;

cout << "Enter A, B, C, or D: ";
cin >> choice;

switch choice;
{
case 'A':
cout << "Allow user to enter the amount of pounds: ";
cin >> mChoc;
break;
case 'B':
cout<< " Allow user to enter the amount of pounds: ";
cin >> dEChoc;
break;

}



return 0;
}
so this is the new one i created, runs and tells me the total amount but still having a hard time trying to input the discount and the shipping and handling afterwords

#include <iostream>
#include <conio.h>
using namespace std;

int main ()
{
float mChoc = 8.50, dEChoc = 9.75, wChoc = 10.50, eTruff = 12.50

char choice ;

cout << "Enter A, B, C, or D: ";
cin >> choice;

switch choice;
{
case 'A':
cout << "Allow user to enter the amount of pounds: ";
cin >> mChoc;
break;
case 'B':
cout<< " Allow user to enter the amount of pounds: ";
cin >> dEChoc;
break;

}



return 0;
}
Please do not double post. It clutters the forum, makes searching harder and wastes time of people which will try to solve problem which can be already solved elsewhere

Second post link: http://www.cplusplus.com/forum/general/112418/
yeah sorry initially tried posting the new code i created but didnt realize i pasted the same thing, and ended up making the second post... i apologize for that
Topic archived. No new replies allowed.