#include <iostream>
#include <fstream>
#include <conio.h>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <process.h>
#include <time.h>
using namespace std;
class ticket{
public:
char name[20];
char cno[11];
} t;
class card : public ticket{
public:
char address[50];
char emailid[20];
} v;
void pay(int);
void random();
void card();
int main(){
system("CLS");
int ent, a, b, N, x, cardid;
char ans;
do{
cout<<"\n\t\t----------------------------------";
cout<<"\n\t\t Movie Ticket Booking System";
cout<<"\n\t\t----------------------------------";
cout<<"\n\t\t\tWelcome Customer!";
cout<<"\n\n\t\t\t<1> Movie Timings";
cout<<"\n\t\t\t<2> Recieving Ticket";
cout<<"\n\t\t\t<3> Contact Us";
cout<<"\n\t\t\t<4> DTCard Registration";
cout<<"\n\t\t\t<5> Exit \n\n";
cout<<"\t\t\tEnter Your Choice :"<<"\t";
cin>>ent;
switch(ent)
{
case 1:
system("CLS");
cout<<"\n\n\t\t\tThe Shows are :";
cout<<"\n\n\t\t\t1. Avengers: Endgame";
cout<<"\n\n\t\t\t2. Super Girl";
cout<<"\n\n\t\t\t3. Deadpool 3";
cout<<"\n\n\t\t\t4. Free Guy";
cout<<"\n\n\t\t\t5. Ready or Not\n";
cout<<"\n\t\t\tEnter Your Choice :"<<"\t";
cin>>a;
cout<<"\n\n\t\t\tThe Timings for the selected show are:";
switch(a)
{
case 1:
system("CLS");
cout<<"\n\n\t\t\tSelect the the timings: ";
cout<<"\n\t\t\t1. 0800";
cout<<"\n\t\t\t2. 1300";
cout<<"\n\t\t\t3. 1450";
cout<<"\n\t\t\t4. 1800";
cout<<"\n\t\t\t5. 2100";
cout<<"\n\t\t\t6. 0100 \n";
cout<<"\n\n\t\tPlease select the timings: ";
cin>>b;
cout<<"\n\n\t\tEnter your name: ";
cin>>t.name;
cout<<"\n\n\t\tEnter your contact number: ";
cin>>t.cno;
cout<<"\n\n\t\tEnter the number of tickets you want to purchase: ";
int x;
cin>>x;
pay(x);
cout<<"\n\n\n\t\t\tYour ticket is here: ";
cout<<"\n\t\t\tName :"<<t.name;
cout<<"\n\t\t\tContact No :"<<t.cno;
cout<<"\n\t\t\tShow timings :";
switch(b)
{
case 1: cout<<"0800";
break;
case 2: cout<<"1300";
break;
case 3: cout<<"1450";
break;
case 4: cout<<"1800";
break;
case 5: cout<<"2100";
break;
case 6: cout<<"0100";
break;
}
cout<<"\n\n\t\t\tDo you want to choose another option(y/n)";
cin>>ans;
system("CLS");
break;
case 2:
system("CLS");
cout<<"\n\n\t\t\tSelect the the timings:";
cout<<"\n\t\t\t1. 0900";
cout<<"\n\t\t\t2. 1100";
cout<<"\n\t\t\t3. 1250";
cout<<"\n\t\t\t4. 1500";
cout<<"\n\t\t\t5. 2000";
cout<<"\n\t\t\t6. 2200";
cout<<"\n\t\t\tPlease select the timings: ";
cin>>b;
cout<<"\n\n\t\t\tEnter your name: ";
cin>>t.name;
cout<<"\n\t\t\tEnter your contact number: ";
cin>>t.cno;
cout<<"\n\t\t\tEnter the number of tickets you want to purchase: ";
cin>>x;
pay(x);
cout<<"\n\n\t\t\tYour ticket is here:";
cout<<"\n\t\t\tName :"<<t.name;
cout<<"\n\t\t\tContact No :"<<t.cno;
cout<<"\n\t\t\tShow timings :";
switch(b)
{
case 1: cout<<"0800";
break;
case 2: cout<<"1300";
break;
case 3: cout<<"1450";
break;
case 4: cout<<"1800";
break;
case 5: cout<<"2100";
break;
case 6: cout<<"0100";
break;
}
cout<<"\n\n\t\t\tDo you want to choose another option(y/n)";
cin>>ans;
system("CLS");
break;
case 3:
system("CLS");
cout<<"\n\n\t\t\tSelect the the timings:";
cout<<"\n\t\t\t1. 0800";
cout<<"\n\t\t\t2. 1300";
cout<<"\n\t\t\t3. 1450";
cout<<"\n\t\t\t4. 1800";
cout<<"\n\t\t\t5. 2100";
cout<<"\n\t\t\t6. 0100";
cout<<"\n\t\t\tPlease select the timings";
cin>>b;
cout<<"\n\t\t\tEnter your name: ";
cin>>t.name;
cout<<"\n\t\t\tEnter your contact number: ";
cin>>t.cno;
cout<<"\n\t\t\tEnter the number of tickets you want to purchase: ";
cin>>x;
pay(x);
cout<<"\n\n\t\t\tYour ticket is here: ";
cout<<"\n\t\t\tName :"<<t.name;
cout<<"\n\t\t\tContact No :"<<t.cno;
cout<<"\n\t\t\tShow timings :";
switch(b)
{
case 1: cout<<"0900";
break;
case 2: cout<<"1300";
break;
case 3: cout<<"1450";
break;
case 4: cout<<"1800";
break;
case 5: cout<<"2100";
break;
case 6: cout<<"0100";
break;
}
cout<<"\n\n\t\t\tDo you want to choose another option(y/n)";
cin>>ans;
system("CLS");
break;
case 4:
system("CLS");
cout<<"\n\n\t\t\tSelect the the timings: ";
cout<<"\n\t\t\t1. 0800";
cout<<"\n\t\t\t2. 1300";
cout<<"\n\t\t\t3. 1450";
cout<<"\n\t\t\t4. 1800";
cout<<"\n\t\t\t5. 2100";
cout<<"\n\t\t\t6. 0100";
cout<<"\n\t\t\tPlease select the timings: ";
cin>>b;
cout<<"\n\t\t\tEnter your name: ";
cin>>t.name;
cout<<"\n\t\t\tEnter your contact number: ";
cin>>t.cno;
cout<<"\n\t\t\tEnter the number of tickets you want to purchase: ";
cin>>x;
pay(x);
cout<<"\n\n\t\t\tYour ticket is here: ";
cout<<"\n\t\t\tName :"<<t.name;
cout<<"\n\t\t\tContact No :"<<t.cno;
cout<<"\n\t\t\tShow timings :";
switch(b)
{
case 1: cout<<"0800";
break;
case 2: cout<<"1300";
break;
case 3: cout<<"1450";
break;
case 4: cout<<"1800";
break;
case 5: cout<<"2100";
break;
case 6: cout<<"0100";
break;
}
cout<<"\n\n\t\t\tDo you want to choose another option(y/n)";
cin>>ans;
system("CLS");
break;
case 5:
system("CLS");
cout<<"\n\n\t\t\tSelect the the timings:";
cout<<"\n\t\t\t1. 0800";
cout<<"\n\t\t\t2. 1300";
cout<<"\n\t\t\t3. 1450";
cout<<"\n\t\t\t4. 1800";
cout<<"\n\t\t\t5. 2100";
cout<<"\n\t\t\t6. 0100";
cout<<"\n\t\t\tPlease select the timings: ";
cin>>b;
cout<<"\n\t\t\tEnter your name: ";
cin>>t.name;
cout<<"\n\t\t\tEnter your contact number: ";
cin>>t.cno;
cout<<"\n\t\t\tEnter the number of tickets you want to purchase: ";
cin>>x;
pay(x);
cout<<"\n \n\t\t\tYour ticket is here: ";
cout<<"\n\t\t\tName :"<<t.name;
cout<<"\n\t\t\tContact No :"<<t.cno;
cout<<"\n\t\t\tShow timings :";
switch(b)
{
case 1: cout<<"0800";
break;
case 2: cout<<"1300";
break;
case 3: cout<<"1450";
break;
case 4: cout<<"1800";
break;
case 5: cout<<"2100";
break;
case 6: cout<<"0100";
break;
}
cout<<"\n\n\t\t\tDo you want to choose another option(y/n)";
cin>>ans;
system("CLS");
break;
}break;
case 2: system("CLS");
cout<<"\n\nThank you for booking the tickets online \nTo print out the tickets please enter your Name in the portal.";
struct pre
{
char name[10];
} p;
cout <<"\nEnter your name:";
cin>>p.name;
cout<<"\nWe're sorry to say, but you will need to get the print out of the booking in front of our cinema.\nThe system did't have a printable function yet.";
cout<<"\n Do you want to choose another option(y/n)";
cin>>ans;
system("CLS");
break;
case 3: system("CLS");
cout<<"Contact us via Sourcecodester or #123456789";
cout<<"\n Do you want to choose another option(y/n)";
cin>>ans;
system("CLS");
break;
case 4: system("CLS");
cout<<"Good Morning/Evening Mam/Sir\n Welcome to our cinemas \n";