Question: Write a MATLAB program that determines whether a meeting room is in violation of fire law regulations regarding the maximum room capacity. The program will
Write a MATLAB program that determines whether a meeting room is in violation of fire law regulations regarding the maximum room capacity. The program will read in the maximum room capacity and the number of people to attend the meeting. If the number of people is less than or equal to the maximum room capacity, the program announces that it is legal to hold the meeting and tells how many additional people may legally attend. If the number of people exceeds the maximum room capacity, the program announces that the meeting cannot be held as planned due to fire regulations and tells how many people must be excluded in order to meet the fire regulations.
Example of the program run
What is the maximum room capacity? 15?How many people are planning to attend the meeting? 18?Sorry, the meeting cannot be held due to the fire regulations. 3 people should be excluded.
Another example of the program run
What is the maximum room capacity? 15?How many people are planning to attend the meeting? 10?It is legal to hold the meeting in the room. 5 more people may attend.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
