Академический Документы
Профессиональный Документы
Культура Документы
int main()
int c;
char r;
cout<<"Today the movies that will be shown are following\n1. The Pursuit of happyness\n2. The
man who knew infinity\n3. The secret life of modern living algorithms\n4. Good will be
hunting"<<endl;
cin>>c;
else
if(c==2)
else
if(c==3)
else
if(c==4)
cin>>select;
if ( select == 1 )
if ( !plane[ row1 ] && row2 <= 30 ) //condition that shows that seats are not
reserved
cout << "Your seat assignment is \a" << row1 << ' '; // a seat is reserved
plane[ row1++ ] = 1;
cout<<"\n_____________________________________________\n";
}
else if ( row1 >= 30 && row2 <= 5 ) { //condition that shows 1st row is full
cin >> r;
cout << "Your seat assignment is\a " << row2<< ' ';
plane[ row2++ ] = 1;
++people;
else
else
else {
cout << "Your seat assignment is\a " << row2 << '\n';
plane[ row2++ ] = 1;
++people;
cin >> r;
if ( toupper( r ) == 'Y' ) {
cout << "Your seat assignment is\a " << row1 << '\n';
plane[ row1++ ] = 1;
++people;
else
else
cout << "\n\nAll seats for this movie are sold."<< endl;
return 0;