Stuck again...Help please

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 attending the meeting. If the number of people is less than or equal to the maximum 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.

This is what I have so far.....

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include iostream
using namespace std;

int main ()
{

int number;
int roomcapacity;
char choice ;

do
{
cout << "Enter the room capacity :";
cin >> roomcapacity;
cout << "Enter number of people in the meeting :";
cin >> number;


if(number <= roomcapacity)
cout << "You can hold the meeting legally!";
else if (number > roomcapacity)
{
cout <<"Warning! you can't hold the meeting. But if you still want to hold" < <<"the meeting you have to exclude: " << (number - roomcapacity) << " guest(s)"; 
}

cout << endl << "Do you want to run the program again? y/n ";
cin >> choice;
cout << endl << endl;
}
while ( choice =='y' || choice == 'Y');


cout << "\nEnd of Program\n\n"; 
return 0;
} 


Every time I run the program, it throws an error on Line 13: cout << "Enter the room capacity :";

Can someone please help me get this straightened out and let me know what I am doing wrong?????
#include<iostream> missing angled braces.

line 23, you have an extra <.
Errors Corrected, try this..
Good Luck, Zaki
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream> //You forgot to add angle brackets <> ,, so Syntax error
using namespace std;

int main ()
{

int number;
int roomcapacity;
char choice ;

do
{
cout << "Enter the room capacity :";
cin >> roomcapacity;
cout << "Enter number of people in the meeting :";
cin >> number;

if(number <= roomcapacity)
cout << "You can hold the meeting legally!";
else if (number > roomcapacity)
{
cout <<"Warning! you can't hold the meeting," << endl;
cout << "But if you still want to hold the meeting you have to exclude: " << (number - roomcapacity) << " guest(s)"; // Deleted " < <<" because they are syntax error to complier and won't complie, they were unnessecarry.
}

cout << endl << endl << "Do you want to run the program again? <y/n> ";
cin >> choice;
cout << endl << endl;
}
while ( choice =='y' || choice == 'Y');

cout << "\nEnd of Program\n\n"; 
return 0;
}
Topic archived. No new replies allowed.