Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created Mar 26, 2019
Embed
What would you like to do?
int main() {
Carpet* carpet = new_carpet(10.0, false);
Room* rectangular_room = new_rectangular_room(2.5, 2.5);
float total = quote(rectangular_room, &rectangular_area , carpet);
printf("Price of rectangular carpet 2.5m x 2.5m at 10.0 p/sqm with no rounding up is %g\n", total);
Room* circular_room = new_circular_room(2.5);
total = quote(circular_room, &circular_area, carpet);
printf("Price of circular carpet of radius 2.5m at 10.0 p/sqm with no rounding up is %g\n", total);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment