Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class CarpetQuote(r, c); ref(Room) r; ref(Carpet) c;
begin
Real procedure quote;
begin
Real area;
area := r.width * r.length;
if c.roundUp then
area := ceiling(area);
quote := c.pricePerSqrMetre * area;
end;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment