serfrancois
Addict
- Joined
- Oct 17, 2018
- Posts
- 19
- Reaction
- 0
- Points
- 66
It's just that guys guys just copied me on YøùTùbé e and still explain what cust.x, cust.movie and so on the codes here please, thanks po. And if you have a cinema ticketing system then share it with me thanks.
that is the output.
movie list
movie time table
unique ticket number or code
1 ticket 1 seat ratio
vacant seat list and taken list
that is the output.
movie list
movie time table
unique ticket number or code
1 ticket 1 seat ratio
vacant seat list and taken list
Code:
#include <iostream>
#include <conio.h>
#include <iomanip>
#include <dos.h>
#include <string>
int p,response,t,choice;
string MOVIE [4] = {"empty", "TRANSFORMER [PG13]", "DISTRICT 9 [18 +]", "WHY I HAVE SOLD [1☍+]"};
int HALL[4]={0,1,2,3};
char ok;
double totalPrice;
double totalSale = 0.0;
double totalSale1 = 0.0;
double totalSale2 = 0.0;
int person ;
string PERSON[3]={"empty","ãdül†","Child"};
const double adultPrice=160.00;
const double childPrice=140.00;
void ******();
void foroosh();
char alpha[11] = {' ','A','B','C','D','E','F','G','H','I','J'};
int a,b;
int cinema[10][6];
int r,c;
struct ticketDetail
{
int x;
int movie,hall,seat;
};
ticketDetail cost;
void checkMenu;
{
cout<<"******************************"<<endl;
cout<<"CHOSEL CINEMA HOUSE"<<endl;
cout<<"[1] NOW SHOWING"<<endl;
cout<<"[2] BUY TICKET"<<endl;
cout<<"[3] EXIT"<<endl;
cout<<endl<<endl;
cout<<"Proceed with your choice: ";
cin>>cust.x;
};
void checkMovie()
{
textcolor(LIGHTGREEN);
cout<<"------------------------------"<<endl;
cout<<"NOW SHOWING IN CINEMA " "";
cout<<endl;
cout<<"------------------------------"<<endl;
cout<<"[1] TRANSFORMER [PG13]"<<endl;
cout<<"[2] DISTRICT [1☍+]"<<endl;
cout << "[3] WHY I HAVE TO CARRY [18 +]" << endl;
cout<<"------------------------------"<<endl;
};
void printMovie(ticketDetail)
{
system("cls");
textcolor(LIGHTBLUE);
cout<<"******************************";
cout<<endl;
cout<<"[1] TRANSFORMER [PG13]"<<endl;
cout<<"[2] DISTRICT [1☍+]"<<endl;
cout << "[3] WHY I HAVE TO CARRY [18 +]" << endl;
cout<<"******************************"<<endl;
cout<<endl;
};
void printHall(ticketDetail)
{
textcolor(LIGHTRED);
cout<<"------------------------------";
cout<<endl;
cout<<"MOVIE HALL";
count<<endl;
cout<<"------------------------------";
cout<<endl;
cout<<"[1] TRANSFORMER [PG13]"<<endl;
cout<<"[2] DISTRICT [1☍+]"<<endl;
cout << "[3] WHY I HAVE TO CARRY [18 +]" << endl;
cout<<"------------------------------";
cout<<endl;
};
void exit()
{
exit(0);
};
void price()
{
if(cust.movie==1)
{
//******//;
cout<<"Price: "<<endl;
cout<<endl;
cout<<"[1] ãdül†"<<endl;
cout<<"[2] Child"<<endl;
cin>>choice;
if (choice==1)
p*adultPrice;
if (choice==2)
p*childPrice;
system("cls");
cout<<"Enter Number of Person: ";
cin>>person;
totalPrice=(p*person);
}
if (cust.movie==2)
{
cout<<"Price :"<<endl;
cout<<endl;
cout<<"[1] ãdül†"<<endl;
cout<<"[2] Child"<<endl;
cin>>choice;
if (choice==1)
p*adultPrice;
if (choice==2)
p*childPrice;
system("cls");
cout<<"Enter number of person: ";
cin>>person;
totalPrice=(p*person);
}
if(cust.movie==3)
{
cout<<"Price : "<<endl;
cout<<endl;
cout<<"[1] ãdül†"<<endl;
cout<<"[2] Child"<<endl;
cin>>choice;
if (choice==1)
p*adultPrice;
if (choice==2)
p*childPrice;
system("cls");
cout<<"Enter number of person: ";
cin>>person;
totalPrice=(p*person);
}
******();
};
void printTicket()
{
cout<<endl;
textcolor(WHITE);
cout<<"CHOSEL CINEMA HOUSE";
cout<<endl;
cout<<"------------------------------";
cout<<endl;
cout<<"MOVIE TITLE :";
cout<<MOVIE[cust.movie]<<endl;
cout<<"Hall :";
cout<<p<<endl;
cout<<"------------------------------";
cout<<endl;
};
void printReport ()
{
cout<<endl;
cout<<endl;
textcolor(YELLOW);
cout<<"TOTAL SALE OF THE MOVIE: ";
cout<<endl;
cout<<"______________________________";
cout<<endl;
cout<<endl;endl;
if (cust.movie==1)
{
totalSale = totalSale + totalPrice;
}
if (cust.movie==2)
{
totalSale1 = totalSale1 + totalPrice;
}
if (cust.movie==3)
{
totalSale2 = totalSale2 + totalPrice;
}
cout<<"Transformer :";
cout<<totalSale<<endl;
cout<<"District 9 :";
cout<< totalSale1<<endl;
cout << "Why I Have You Pinned:";
cout<<totalSale2<<endl;
cout<<endl;
};
void checkReport()
{
textcolor(PINK);
cout<<"REPORT OF TOTAL SALE PER MOVIE A DAY: ";
cout<<endl;
cout<<"------------------------------";
cout<<endl;
if (totalSale > totalSale1 && totalSale > totalSale2)
{
cout<<"Highest = "<< MOVIE[1]<<" :"<<totalSale<<endl;
}
if (totalSale1 > totalSale && totalSale1 > totalSale2)
{
cout<<"Highest = "<< MOVIE[2]<<" :"<<totalSale1<<endl;
}
if (totalSale2 > totalSale && totalSale2 > totalSale1)
{
cout<<"Highest = "<< MOVIE[3]<<" :"<<totalSale2<<endl;
}
if (totalSale <totalSale1 && totalSale < totalSale2)
{
cout<<"Lowest = "<< MOVIE[1]<<" :"<<totalSale<<endl;
}
if (totalSale1 <totalSale && totalSale1 < totalSale2)
{
cout<<"Lowest = "<< MOVIE[2]<<" :"<<totalSale1<<endl;
}
if (totalSale2 <totalSale && totalSale2 < totalSale1)
{
cout<<"Lowest = "<< MOVIE[3]<<" :"<<totalSale2<<endl;
}
cout<<"*********************************";
cout<<endl;
cout<<endl;
};
void ******()
{
system("cls");
cout<<"NO :\t1\t2\t3\t4\t5\t6 "<< endl;
for( a=0;a<=10;a++)
{
cout << alpha[a]<<" "<<endl;
for (b=0;b<=6;b++)
{
cout<< " ";
if (cinema[a][b]==0)
{
cout<<"*" << " ";
}
else
{
if (r==a && c==b)
{
cout<<"";
}
cout<<"X"<<" ";
}
}
cout<<endl;
}
void foroosh()
{
int r,c;
cout<<"Please Enter row number 0-15: ";
cin>>r;
cout>>"Please Enter col number 0-19 :";
cin>>c;
cout<<endl;
cinema[r][c]=1;
textcolor(LIGHTRED);
cout<<"Seat:";
cout<<alpa[r]<<c;
cout<<" is SOLO";
cout<<endl;
}
int main()
{
while(cust.x!=3)//ask user to enter choice of menu
{
system("cls");
checkMenu();
cout<<endl;
if(cust.x==1)
{
system("cls");
checkMovie();
cout<<endl<<endl;
cout<<"continue?";
cout<<endl;
cout<<"[1] yes"<<endl;
cout<<"[2] no"<<endl;
cin>>response;
cout<<endl;
if (response==1)
{
system("cls");
checkMenu();
}
else
exit();
cout<<"EXIT"<<endl;
}
if (cust.x==2)
{
system("cls");
cout<<endl;
printMovie(cust);
cout<<"Enter your choice:";
cin>>cust.movie;
printHall(cust);
cout<<"Enter your choice:";
cin>>cust.hall;
cout<<endl;
//******();
//cout<<endl;
price();
//******();
system("cls");
while(person!=0)
{
foroosh();
cout<<endl;
cout<<"please wait:";
for(a=0;a<2;a++)
{
cout<<(".");
sleep(1);
}
cout<<endl;
printTicket();
}
//system("cls");
printReport();
cout<<endl;
checkReport();
cout<<endl;
cout<<"Back to Menu? (Y)"<<endl;
cin>>ok;
if (ok == 'Y' || 'y')
{
sysmte("cls");
checkMenu();
}
}
if (cust.x==3)
{
exit();
cout<<endl;
}
}
getch();
return 0;
}