an amphitheater has capacity of 45 seats design an entrant counting system and give an indication when theatre is full
Answers
Answered by
0
Answer:
#include <iostream>
using namespace std;
int main()
{
int max_capacity = 45;
for(int i = 0; i<= max_capacity; i ++){
int bookings;
cin>>bookings;
if(bookings<=max_capacity)
max_capacity = max_capacity - bookings;
else
cout<< "max capacity reached"<<endl;
}
if(max_capacity==0){
cout<< "max reached"<<endl;
}
return 0;
}
Explanation:
Similar questions