include <iostream>
using namespace std;
int main (){
char package,pkg,ticks,discount;
int ticket,adult,children,price,pricechildren,priceadult,pricefamily,pricestudent,pricecouple,totalpriceind,totalpriceall,totalpricepkg,totalpriceinddiscount;
int totalpricealldiscount;
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";
cout<<"\n\nWould you like to a package(Y / N): ";
cin>>package;
if (package=='Y' || package =='y')
{
cout<<"\nFamily Package";
cout<<"\n2 adult";
cout<<"\n2 children";
cout<<"\nRM150";
cout<<"\nPackage F";
cout<<"\n\nStudent package";
cout<<"\n5 Student";
cout<<"\n(each student must show their student id)";
cout<<"\nRM200";
cout<<"\n Package S";
cout<<"\n\nCouple package:";
cout<<"\n 2 Adult";
cout<<"\n RM70";
cout<<"\nPackage C";
cout<<"\n\nChoose Package:";
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<<"invalid";
}
cout<<"\nWould you like to add more tickets? (Y/N)";
cin>>ticks;
if (ticks=='Y' || ticks =='y')
{
cout<<"\nchildren:";
cin>>children;
if (children>0)
{
pricechildren=30*children;
}
else
{
pricechildren=0;
}
cout<<"RM"<<pricechildren;
cout<<"\nadult:";
cin>>adult;
if(adult>0)
{
priceadult=50*adult;
}
else
{
priceadult=0;
}
cout<<"RM"<<priceadult;
totalpriceind=priceadult+pricechildren;
totalpriceall=totalpriceind+pricefamily+pricestudent+pricecouple;
totalpricealldiscount=totalpriceall*0.8;
cout<<"\ntotal price: RM "<<totalpriceall;
}
else
{
totalpricepkg=pricefamily+pricestudent+pricecouple;
}
cout<<"\nTotalprice: RM"<<totalpricepkg;
}
else
{
cout<<"TICKETS";
cout<<"\nchildren:";
cin>>children;
if (children>0)
{
pricechildren=30*children;
}
else
{
pricechildren=0;
}
cout<<"RM"<<pricechildren;
cout<<"\nadult:";
cin>>adult;
if(adult>0)
{
priceadult=50*adult;
}
else
{
priceadult=0;
}
cout<<"RM"<<priceadult;
totalpriceind=priceadult+pricechildren;
totalpriceinddiscount=totalpriceind*0.8;
cout<<"\nTOTAL:"<<totalpriceind;
}
cout<<"\n20% Public Holiday discout (Y / N)?; ";
cin>>discount;
if (discount=='Y' || pkg=='y')
{
totalpriceinddiscount=totalpriceinddiscount;
totalpricealldiscount=totalpricealldiscount;
}
cout<<"\nTOTAL:"<<totalpriceinddiscount;
cout<<"\nTOTAL:"<<totalpricealldiscount;
}
Ticket PRICING:
Children (Below 2 Years old : FREE
Children (2-13 Years old) : RM30
Adult (14-60 Years old) : RM50
Senior Citizen (61 years and above) : Free
Would you like to a package(Y / N): Y
Family Package
2 adult
2 children
RM150
Package F
Student package
5 Student
(each student must show their student id)
RM200
Package S
Couple package:
2 Adult
RM70
Package C
Choose Package:C
PRICE: RM70
Would you like to add more tickets? (Y/N)Y
children:3
RM90
adult:2
RM100
total price: RM 260
Totalprice: RM33
20% Public Holiday discout (Y / N)?; Y
TOTAL:0
TOTAL:208
I dont know where the hell i got RM33.
HELP MEE