Output trouble

I am suppose to write a menu based program that is suppose to pick an item off a menu, a side, and a drink. I tried to do as much as I could on my own but I'm stuck. When I run the program, and enter my choices in, it gives me weird numbers. Like: If I input choice 4(Deluxe Mix) and for a side I enter 8 (Cole Slaw) and for drink I enter 15 (orange juice); instead of adding their values to equal 8.7, it outputs the number 14. I feel like I'm forgetting something small, or just I'm completely wrong. -- Thanks in advance!
P.S sorry everything is so spaced out, it helps me see better

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
  #include <iostream>
#include <iomanip>
using namespace std;
int main()
{
	
	
	
	
	int choice;
	int choice2;
	int choice3;
	float price; 
	
    double       TURKEY = 2.50,
				roastBeef = 4.95,
				hamAndCheese = 4.95,
				deluxeMix = 4.95,
				frenchFries = 2.50,
				onionRings = 2.75,
				macAndCheese = 2.50,
				coleSlaw = 2.25,
				pepsi = 1.25, 
				orange = 1.25,
				mountainDew = 1.25,
				rootBeer = 1.25, 
				water = 1.00,
				sierraMist = 1.25,
				orangeJuice = 1.50, 
				appleJuice = 1.50;
	
	 
 const int    TURKEY_CHOICE = 1,
				roastBeef_choice = 2,
				hamAndCheese_choice = 3,
				deluxeMix_choice = 4,
			
				frenchFries_choice2 = 5,
				onionRings_choice2 = 6,
				macAndCheese_choice2 = 7, 
				coleSlaw_choice2 = 8,
			
				pepsi_choice3 = 9,
				orange_choice3 = 10,
				mountainDew_choice3 = 11,
				rootBeer_choice3 = 12,
				water_choice3 = 13, 
				sierraMist_choice3 = 14, 
				orangeJuice_choice3 = 15,
				appleJuice_choice3 = 16;
				
						
				
	
	cout << "\t\tChuckie's Kitchen Cold Sandwhiches\n"
	
		 << "1. Turkey\n"
		 << "2. Roast Beef\n"
		 << "3. Ham and Cheese\n"
		 << "4. Deluxe Mix\n\n"
		 
		<< "\t\tSide Items\n\n"
		 << "5. French Fries\n"
		 << "6. Onion Rings\n"
		 << "7. Mac and Cheese\n"
		 << "8. Cole Slaw\n\n"
		 	
			  << "\t\tBeverages\n\n"
			 << "9. Pepsi\n"
			 << "10. Orange\n"
			 << "11. MountainDew\n"
			 << "12. Root Beer\n"
			 << "13. Water\n"
			 << "14. Sirrea Mist\n"
			 << "15. Orange juice\n"
			 << "16. Apple Juice\n\n"
			 << "What cold sandwhich would you like? ";
		
		
		
		
		cin >> choice;
	
	
		cout << fixed << showpoint << setprecision (2);



switch (choice)
{

	
	case TURKEY_CHOICE:
		
	cout << "what Side iem would you like? ";
		
		cin >> choice;
		
	cout << "And what beverage would you like? ";
	cin >> choice;
	price = choice+=choice2+=choice3;
	
	cout << "The total amount is: " << price << endl;
		
			
		
}
switch (choice)
{
		
		case roastBeef_choice:
		
		cout << "what Side iem would you like? ";
		
		cin >> choice;
		
	cout << "And what beverage would you like? ";
	cin >> choice;
	price = choice+=choice2+=choice3;
	
	cout << "The total amount is: " << price << endl;
		
		
		
		
		
	}
switch (choice)
{

case hamAndCheese_choice:

cout << "what Side iem would you like? ";
		
		cin >> choice;
		
	cout << "And what beverage would you like? ";
	cin >> choice;
	price = choice+=choice2+=choice3;
	
	cout << "The total amount is: " << price << endl;	
	
}	
switch (choice)
{
	
	case deluxeMix_choice:
	
	cout << "what Side iem would you like? ";
		
		cin >> choice;
		
	cout << "And what beverage would you like? ";
	cin >> choice;
	price = choice+=choice2+=choice3;
	
	cout << "The total amount is: " << price << endl;
	
	
	
	
	
}










	
	return 0;
}
There are a number of issues wrong with your program at the moment. Make sure you review how to write switch statements, the format for switches should be

1
2
3
4
5
6
7
8
9
switch(x) {
    case: a
 
    break;
    case: b
    
    break;
    //etc..
}


rewriting switch ruins the purpose of the statement, it's designed to be a better option than using a cluster of if statements.

You're also doing something really wonky here:

price = choice1+=choice2+=choice3

you never initialize choice2 or 3 to zero and also don't use them anywhere in the program, what is the point of these extra two variables? If you want the price to be added on you would say

price += choice1
Topic archived. No new replies allowed.