I have to display result like this on screen.
Floor Rooms Available Occupied
--––––––––––––––––––––––––––––––––––––––––––––––
Floor 1 23 9 14
————————————————————————––––––––––––––-----------
Floor 2 12 5 7
how would i do this? This is my code. Please help!!
int floors, rooms, totalrooms, totaloccupied, occupied, count;
count = 0;
cout << "How many floors does the hotel have?\n";
cin >> floors;
for (; count <=floors; count++) {
cout << "How many rooms on floor " << count << "?\n";
cin >> rooms;
cout << "How many of those rooms are currently occupied?\n";
cin >> occupied;
if (occupied > rooms)
{
cout << "The rooms occupied cannot exceed the number of rooms.\n";
cout << "How many rooms on floor " << count << " are occupied?\n";
cin >> occupied;
}