I can"t get this program to work.

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
#include<iostream>
#include<cctype>
using namespace std;

int main()
{
	char choice;
	double charges;
	double units;
	double package_A, package_B, package_C;
	
	do
		{
	cout <<"Which pakage are you shopping for?:Please enter A, B, C, or Q to quit."<< endl;
	cin>> choice;
	cout <<"How many message units?:"<< endl;
	cin>>units;
	while(unit <= 672);
	cout<<"Enter a number from 0 through 672 for message units."<<endl; 
	       choice = toupper(choice);
	}while(choice !='A' && choice !='B' &&	choice !='C' && choice !='Q');
		(unit <= 672);
		switch(choice)
	{
		case 'A':
		
		cout<<"How many massage units?:"<<endl;
		cin>>units;
		
		if (unit <=10)
		
		charges = 9.95
	else
		(unit > 10)
		
		charges = (unit * 2) + 9.95;
		cout<<"The charges are:"<< charges<< endl;
		break;
		
		case 'B':
		
		cout<<"How many massage units?:"<<endl;
		cin>>units;
		
      if (unit <= 20)
		charges = 19.95;
		
	 else (unit >20)
			charges = (unit - 20) + 19.95;
			cout<<"The charges are:"<< charges<< endl;
			
			break;
			case 'C':
		
		cout<<"How many massage units?:"<<endl;
		cin>>units;
         
			charges = 39.95;
			break;
					
		case 'Q':
		
			cout<<"How many massage units?:"<<endl;
		   cin>>units;
			
			cout<<"Thank you for using this program. Goodbye."<< endl;
			break;
			default:
			cout<<"Enter only A, B, C, or Q."<<endl;
			}
			
	if (A < B && A > C)
	plan = (pakage_A - pakage_B);
	 cout<<"By switching to Package A you would save:$"<< plan<<endl;
	 
	 else if (pakage_B < pakage_C)
	 
	  cout<<"By switching to Package B you would save:$"<< plan<<endl;
	 
	 else
	 cout<<"By switching to Package C you would save:$"<< plan<<endl;

}

return 0;

}
your while loops are out of place. Check their syntax.
Topic archived. No new replies allowed.