Hey CommonTater, thanks for the help, but do I need to show the calculation in my coding? if yes, I did this coding, I know it's long and there's a better way to make it shorter, but it won't let me run it cuz i get an error in line 55, can you please tell me if this is what I'm supposed to do and tell me what might possibly be the error.
Code:
// Jay Hakimi
// COP 3223 Section 4
// Programming Assignment #1
// A Program to help Arup make decisions concerning his wedding
#include <stdio.h>
int main (void)
{
int length_of_room, width_of_room;
int length_of_table, width_of_table;
int space_walls_tables;
int people_per_table;
int max_people;
int nlength_table, nwidth_table;
int num_table1, num_table2, num_table3, num_table4;
int max_table1, max_table2;
int max_people1, max_people2;
length_of_room = 50;
width_of_room = 30;
length_of_table = 8;
width_of_table = 4;
space_walls_tables = 3;
people_per_table = 10;
nlength_table = space_walls_tables+length_of_table;
nwidth_table = space_walls_tables+nwidth_table;
num_table1 = length_of_room/nlength_table;
num_table2 = length_of_room/nwidth_table;
num_table3 = width_of_room/nlength_table;
num_table4 = width_of_room/nwidth_table;
max_table1 = num_table1*num_table4;
max_table2 = num_table2*num_table3;
max_people1 = max_table1*people_per_table;
max_people2 = max_table2*people_per_table;
printf ("What are the length and width of the room?\n");
printf ("%d feet by %d feet\n\n", length_of_room, width_of_room);
printf ("What are the length and width of each table?\n");
printf ("%d feet %d feet \n\n", length_of_table, width_of_table);
printf ("How much space is required between each table?\n");
printf ("%d feet\n\n", space_walls_tables);
printf ("What is the max number of people per table?\n");
printf ("%d People\n\n", people_per_table);
if (max_people1 > max_people2)
printf ("This arrangment seats %d people\n", max_poeple1); <----------------- ERROR
else
printf ("This arrangment seats %d people\n", max_people2);
return 0;
}