Yeah so it's been a long day and I'm trying to think of an equation to solve this situation but I'm tired, it's extra credit, and I really can't concentrate.
Here's the diagram http://i52.tinypic.com/144bnva.jpg
My goal is, given a user input of length and width of the room, radius of the tables, space between each table / wall, and number of people per table, how many people does the arrangement fit.
When there is no offset row of tables as in the tables look like
the equation to find the amount of people is
I need to find an equation that does the same thing, but with the offset row incorporated. Sorry if this doesn't make sense.Code:int tables_across = (room_length-space)/(table_radius*2+space); int tables_wide = (room_width-space)/(table_radius*2+space); printf("This arrangement seats %d people.\n", tables_across*tables_wide*people_table);