i need some assistance with the program. When the number of people is greater than the maximum number of people allowed in the room, the last statement does not print. I am not sure if i did something wrong, or missed an important item. I don't think i need to include a Boolean expression in the last else statement according to the text i am using, this is why i did not use any boolean expression there Please assist. Thanks for your help
//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 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.
#include <iostream>
using namespace std;
int main()
{
//variable declaration
int numberOfPeople, maxRoomCapacity, morePeople, lessPeople;
//program ask user of input
cout << "Enter the number of people to attend the meeting: ";
cin >> numberOfPeople;
cout << "What is the room capacity: ";
cin >> maxRoomCapacity;
//formula to calculate the number of people that meets fire regulation
morePeople = maxRoomCapacity - numberOfPeople;
lessPeople = numberOfPeople - maxRoomCapacity;
//if-else statement to determine if fire regulation is met
if (numberOfPeople < maxRoomCapacity)
{
cout << "It is legal to hold the meeting in the room, plus " << morePeople
<< " additional people may legally attend the meeting." << endl;
}
else if (maxRoomCapacity = numberOfPeople)
{
cout << "It is legal to hold the meeting in the room, no additional person can be allowed." << endl;
}
else
{
cout << "This meeting cannot be held as planned due to fire regulations. "
<< lessPeople << " people must be excluded in order to meet the fire regulations." << endl;
}
system("pause");
return 0;
}