Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that reads in a room number, its capacity, and the size of the c

ID: 3651689 • Letter: W

Question

Write a program that reads in a room number, its capacity, and the size of the class enrolled so far and prints an output line showing the classroom number, capacity, number of seats filled, number of seats available, and a message indicating whether the class is filled. Call a function to display the following heading before the first output line: Room Capacity Enrollment Empty Seats Filled/Not Filled Display each part of the output line under the appropriate heading. Test your program with program with the following classroom data: Room Capacity Enrollment 426 25 25 327 18 14 420 20 15 317 100 90

Explanation / Answer

#include #include using namespace std; char *titles[] = { "Room", "Capacity", "Enrollment", "Empty Seats," "Filled/Not Filled" }; int table[][4] = { { 426, 25, 25 }, { 327, 18, 14 }, { 420, 20, 15 }, { 317, 100, 90}, }; int main(int argc, char* argv[]) { int count = sizeof(table)/sizeof(table[1]); for (int j=0; j
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote