In Theory...
Code:
#include <stdio.h>
int main(int args,char *argv[]) {
float roomWidth = 20, roomLength = 30;
float tableWidth = 4, tableLength = 7;
float spaceWidth = 4, spaceLength = 6;
float floorSpace = (roomWidth*roomLength);
float tableSize = ((tableWidth+(spaceWidth*2))*(tableLength+(spaceLength*2)));
int tableCount = (floorSpace/tableSize);
printf("In a room of size [%.2f x %.2f]. ", roomWidth,roomLength);
printf("You have a total area of [%.2f]. ", floorSpace);
printf("Considering tables that are [%.2f x %.2f], ", tableWidth,tableLength);
printf("a width spacing of [%.2f] on both sides ", spaceWidth);
printf("and a length spacing of [%.2f] on both sides. ", spaceLength);
printf("Since a table and the space around it requires [%.2f]. ",tableSize);
printf("You can fit a maximum of [%i] tables in the room. ", tableCount );
printf("\n");
return 0;
};