Question: In C#: Write a program that determines whether a meeting room is in violation of fire law regulations regarding the maximum room capacity. The program

In C#:

  1. Write a 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 the 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.

Output:

Enter the maximum room capacity: 50

Enter the number of people to attend the meeting: 45

It is legal to attend the meeting. 5 more people can still attend.

** This is what I have so far:

namespace Chapter_10 { class Program { static void Main(string[] args)

int number; int roomcapacity; char choice;

Console.WriteLine ("Enter the room capacity :"); roomcapacity;

Console.WriteLine ("Enter number of people in the meeting :");

if(number <= roomcapacity); Console.WriteLine ( "You can hold the meeting legally!"); else if (number > roomcapacity); Console.WriteLine ("Warning! you can't hold the meeting,")

Console.WriteLine ( "But if you still want to hold the meeting you have to exclude: " = number - roomcapacity " guest(s)");

{ } } } Any help would be greatly appreciated. Remember it's C#. Thank you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!