help me to make the header file for the movie ticket system..

#include<iostream>
using namespace std;

int main()
{
// added total2 to calculate overall sales
int seat, adult, child, total, total2;
char flag;

seat = 0;
adult = 0;
child = 0;
total = 0;
total2 = 0;

// replace the do while loop with while loop
while (seat < 20)
{

cout << "******************************************************" << endl;
cout << "* Welcome to NazNif Cineplex * " << endl;
cout << "* The Store Mall, Kangar, Perlis * " << endl;
cout << "******************************************************" << endl;

cout << "Enter number of adult customers" << endl;
cin >> adult;

cout << "Enter number of child customers" << endl;
cin >> child;

total = (adult * 8) + (child * 4);

// total2 will keep track of overall sales
total2 = total2 + total;

seat = seat + adult + child;
cout << "\n";
cout << "\n";
cout << "******************************************************" << endl;
cout << "Adult " << adult << endl;
cout << "Children " << child << endl;
cout << "TOTAL RM" << total << endl;
cout << "******************************************************" << endl;
cout << "\n";
cout << "\n";

cout << "Enter Y to continue" << endl;
cin >> flag;

// if statement below will check whether to continue or quit
if (flag == 'y' || flag == 'Y')
{
continue;
}
else
{
break;
}

}

cout << "Reached maximum capacity of Cineplex!!!" << endl;
cout << "The total amount of sales today is RM" << total2 << endl;
cout << "System exit..." << endl;

return 0;

}
Last edited on
First of all, format your posts in the "[code"] and "[/code"] tags.

Second of all, what is the point of this post? Do you have a question, or are you trying to give out free help to the people who need to learn it on their own (without copying someone else's code)?
Last edited on
i just want to know what is the header file for my source file..i only know how to do this thing only...
uhh...iostream?
Topic archived. No new replies allowed.