1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
#include <iostream>
#include <iomanip>
#include <istream>
using namespace std;
void place(char seats[15][30]);
int main ()
{
char seats[15][30]={{'*','*','*','*','*','#','#','*','*','*','*','*','*','*','#','*','*','*','*','*','#','#','#','#','#','#','*','*','*','#'},{'*','*','#','#','*','*','*','#','#','#','*','*','#','*','*','*','*','*','#','#','*','*','#','#','*','*','*','#','*','*'},{'#','#','*','#','*','#','#','*','*','#','#','*','*','*','#','#','*','*','*','*','#','#','#','#','#','#','#','#','*','#'},{'*','*','#','*','*','#','#','*','*','#','*','*','*','*','#','*','#','*','*','*','#','#','#','#','#','#','*','*','#','#'},{'#','#','#','#','*','*','*','#','#','#','*','*','#','*','#','*','*','*','#','#','*','*','#','#','*','*','*','#','*','*'},{'#','*','*','*','*','#','#','*','*','*','*','*','*','*','#','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'},{'*','*','*','*','*','*','#','*','*','*','*','*','*','*','#','*','*','*','*','*','#','*','#','*','#','#','*','*','*','*'},{'*','*','*','*','*','*','*','*','*','*','*','*','*','*','#','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'},{'*','*','*','*','*','*','#','*','*','*','*','*','*','*','*','*','*','*','*','*','#','#','*','*','#','#','*','*','*','#'},{'*','*','*','#','*','*','*','#','*','#','*','*','#','*','*','*','*','*','#','#','*','*','#','#','*','*','*','#','*','*'},{'*','*','*','*','*','#','*','*','*','*','*','*','*','*','*','*','*','*','*','*','#','*','*','*','*','#','*','*','*','*'},{'*','*','*','*','*','*','#','*','*','*','*','*','*','*','#','*','*','*','*','*','*','#','#','#','*','*','*','*','*','#'},{'*','*','*','*','*','#','#','*','*','*','*','*','*','*','*','*','*','*','*','*','#','#','*','*','*','*','*','*','*','#'},{'*','*','*','*','*','*','#','*','*','*','*','*','*','*','#','*','*','*','*','*','*','*','*','#','#','#','*','*','*','*'},{'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','*','#'}};
cout<<" The Dikir Barat Show"<<endl;
cout<<setw(40)<<"Welcome"<<endl;
place(seats);
cout<<endl<<"* : AVAILABLE\n"<<"# : BOOKED";
cout<<endl<<endl<<endl;
cout<<" TICKET PRICING"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<"| Row | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |"<<endl;
cout<<"_______|_______|_______|_______|_______|_______|_______|_______|_______|"<<endl;
cout<<"| RM | 10 | 10 | 10 | 12 | 14 | 16 | 18 | 20 |"<<endl;
cout<<"_______________|_______|_______|_______|_______|_______|_______|_______|"<<endl;
cout<<"________________________________________________________________"<<endl;
cout<<"| Row | 9 | 10 | 11 | 12 | 13 | 14 | 15 |"<<endl;
cout<<"_______|_______|_______|_______|_______|_______|_______|_______|"<<endl;
cout<<"| RM | 25 | 30 | 25 | 20 | 18 | 14 | 10 |"<<endl;
cout<<"_______|_______|_______|_______|_______|_______|_______|_______|"<<endl<<endl;
return 0;
}
void place(char seat[15][30])
{
cout<<endl<<setw(40)<<"Seats"<<endl;
cout<<" | a | b | c |"<<endl;
cout<<" ";
for (int i=1;i<10;i++)
{
cout<<i<<" ";
continue;
}
for (int i=10;i<20;i++)
{
cout<<i-10<<" ";
continue;
}
for (int i=20;i<30;i++)
{
cout<<i-20<<" ";
continue;
}
int i;
if (i=30)
{
cout<<i-30<<" ";
}
cout<<endl;
for (int i=0;i<9;i++)
{
cout<<"ROW "<<i+1<<" ";
for (int j=0;j<30;j++)
{
cout<<seat[i][j]<<" ";
}
cout<<endl;
continue;
}
for (int i=9;i<15;i++)
{
cout<<"ROW "<<i+1<<" ";
for (int j=0;j<30;j++)
{
cout<<seat[i][j]<<" ";
}
cout<<endl;
continue;
}
}
|