Module need helps

Help me to make Module on this code pls.

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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
#include <iostream>
using namespace std;
int main (){
	
	char package,pkg,ticks,discount,i='Y';
	int ticket,adult,children,price,pricechildren,priceadult,pricefamily,pricestudent,pricecouple,totalpriceind,totalpriceall,totalpricepkg,totalpriceinddiscount;
	int totalpricealldiscount,totalpricepkgdiscount;
	
	cout<<"******************** Welcome TO SUPER WATERPARK ********************";
	cout<<"\nTicket PRICING: ";
	cout<<"\nChildren (Below 2 Years old         : FREE";
	cout<<"\nChildren (2-13 Years old)           : RM30";
	cout<<"\nAdult (14-60 Years old)             : RM50";
	cout<<"\nSenior Citizen (61 years and above) : Free";
	
	while (i!='N'&& i!='n'){
	cout<<"\n\nWould you like Choose a package(Y / N): ";
	cin>>package;
	if (package=='Y' || package =='y')
    {
		cout<<"\n*Family Package(Package F)*";
		cout<<"\n2 adult";
		cout<<"\n2 children";
		cout<<"\nRM150";
		cout<<"\n************";
		cout<<"\n\n*Student package(Package S)*";
		cout<<"\n5 Student";
		cout<<"\n(each student must show their student id)";
		cout<<"\nRM200";
		cout<<"\n************";
		cout<<"\n\n*Couple package(Package C)*";
		cout<<"\n2 Adult";
		cout<<"\nRM70";
		cout<<"\n************";
		
		cout<<"\n\nChoose Package(F/ S/ C):";
		cin>>pkg;
		if (pkg=='F' || pkg=='f')
		{
			pricefamily=150;
			cout<<"PRICE: RM"<<pricefamily;
		}
		else if (pkg=='S'|| pkg=='s')
		{
			pricestudent=200;
			cout<<"PRICE: RM"<<pricestudent;
		}
		else if (pkg=='C' || pkg=='c')
		{
			pricecouple=70;
			cout<<"PRICE: RM"<<pricecouple;
		}
		else
		{
			cout<<"\ninvalid";
		}
		
	 cout<<"\n\nWould you like to add more tickets? (Y/N): ";
	 cin>>ticks;
	 cout<<"Tickets";
			if (ticks=='Y' || ticks =='y')
			{
				cout<<"\n\nchildren:";
				cin>>children;
					if (children>0)
						{
							pricechildren=30*children;
						}
					else
						{
							pricechildren=0;
						}
					cout<<"PRICE: RM"<<pricechildren;
			
				cout<<"\n\nadult:";
				cin>>adult;
					if(adult>0)
						{
							priceadult=50*adult;
						}
					else
						{
							priceadult=0;
						}
				cout<<"PRICE: RM"<<priceadult;
				totalpriceind=priceadult+pricechildren;
				totalpriceall=totalpriceind+pricefamily+pricestudent+pricecouple;
				totalpricealldiscount=totalpriceall*0.8;
				cout<<"\n\ntotal price: RM"<<totalpriceall;
				cout<<"\n*************************************";
				
					cout<<"\n\n20% Public Holiday discout (Y / N)?: ";
					cin>>discount;
					cout<<"\n*************************************";
						if (discount=='Y' || discount=='y')
							{
								totalpricealldiscount=totalpricealldiscount;
								cout<<"\nFINAL PRICE: RM"<<totalpricealldiscount;
							}
						else
							{
								totalpriceall=totalpriceall;
								cout<<"\nFINAL PRICE: RM"<<totalpriceall;
							}
		
			}
			else if (ticks=='N' || ticks =='n')
			
			{
				totalpricepkg=pricefamily+pricestudent+pricecouple;
				totalpricepkgdiscount=totalpricepkg*0.8;
				cout<<"\nTotalprice: RM"<<totalpricepkg;
				
				cout<<"\n20% Public Holiday discout (Y / N)?: ";
					cin>>discount;
					cout<<"\n*************************************";
						if (discount=='Y' || discount=='y')
							{
								totalpricepkgdiscount=totalpricepkgdiscount;
								cout<<"\nFINAL PRICE: RM"<<totalpricepkgdiscount;
							}
						else
							{
								totalpricepkg=totalpricepkg;
								cout<<"\nFINAL PRICE: RM"<<totalpricepkg;
							}
			}
			else
			{
				cout<<"invalid";
			}
	}
	else if (package=='N' || package =='n')
	{
		cout<<"TICKETS";
		cout<<"\n\nchildren: ";
		cin>>children;
		if (children>0)
		{
			pricechildren=30*children;
		}
		else
		{
			pricechildren=0;
		}
		cout<<"PRICE: RM"<<pricechildren;
			
		cout<<"\n\nadult: ";
		cin>>adult;
		if(adult>0)
		{
			priceadult=50*adult;
		}
		else
		{
			priceadult=0;
		}
		cout<<"PRICE: RM"<<priceadult;
		totalpriceind=priceadult+pricechildren;
		totalpriceinddiscount=totalpriceind*0.8;
		cout<<"\n\nTOTAL: "<<totalpriceind;
		
		cout<<"\n\n20% Public Holiday discout (Y / N)? : ";
		cin>>discount;
		cout<<"\n*************************************";
						if (discount=='Y' || discount=='y')
							{
								totalpriceinddiscount=totalpriceinddiscount;
								cout<<"\nFINAL PRICE: RM"<<totalpriceinddiscount;
							}
						else if (discount=='N' || discount=='n')
						{
							totalpriceind=totalpriceind;
							cout<<"\nFINAL PRICE: RM"<<totalpriceind;
						}
						else 
						{
							cout<<"invalid";
						}
		
	} 
	else
	{
		cout<<"INVALID";
	}
	
cout<<"\n*************************************";
cout<<"\n\nPROCEED WITH NEW CUSTOMER(Y/ N) : ";
cin>>i;
cout<<"\n*************************************";
}

	return 0;
	

		
}
Help me to make Module on this code pls.


Do what?

Can you explain clearly, completely and precisely what it is you want to do?
Topic archived. No new replies allowed.