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
Hey thedoung,

You just posted out is a program that show ticket booking on command prompt or terminal, but it is not that useful in the world of very good UI.

Sure you can build the one with nice UI in Qt or Juce, with C++. But above code is not much help.. Or you should have proposed some functionalities with detailed analysis to get good help, What do you say of that, You bring out that, we can work upon ..
Topic archived. No new replies allowed.