i need to write a program that determines whether a meeting room is in violation of fire law regulations regarding 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 capacity, the program announces that the meeting cannot be held as planned due to fire regulations and tells how many people must be excluded on order to meet the fire regulations... please help me

``````#include<iostream.h>
#include<conio.h>

main(){
clrscr();
int a,b,c,d;

cout<<"Enter Room Capacity: "<<endl;
cin>>a;
cout<<"Enter number of People: "<<endl;
cin>>b;

cout<<endl;
if(b<=a){
cout<<"Cannot be held due to fire regulations."<<endl;
}

// i dont know what to do next here... i hate my instructor T_T

getch();
return 0;
}``````

Edited by Nick Evan: Added code-tags

Attachments
``````#include<iostream.h>
#include<conio.h>

main(){
clrscr();
int a,b,c,d;

cout<<"Enter Room Capacity: "<<endl;
cin>>a;
cout<<"Enter number of People: "<<endl;
cin>>b;

cout<<endl;
if(b<=a){
cout<<"Cannot be held due to fire regulations."<<endl;
}

getch();
return 0;
}``````
2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by enderes05

I think you need to double-check the assignment. If the people present is less than the capacity, there should be no issue

// i dont know what to do next here... i hate my instructor T_T

This is completely immature. This is not an issue with your instructor. This is you being lazy. If there are too many people in the room, how many too many are there? It's simple subtraction. If you can't figure that out, drop your programming class and go back to math 101...

Edited by Fbody: n/a

I think you need to double-check the assignment. If the people present is less than the capacity, there should be no issue

This is completely immature. This is not an issue with your instructor. This is you being lazy. If there are too many people in the room, how many too many are there? It's simple subtraction. If you can't figure that out, drop your programming class and go back to math 101...

dont be like that... i want to learn programming T_T

@Fbody: thanks! you give me an idea! :D done!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.