Define struct Rectangle { Point topLeft; Point bottomRight; };. Write int area(Rectangle r) that calculates area from corners. Area is width times height. Width is the difference between x coordinates: r.bottomRight.x - r.topLeft.x.
Height is difference between y coordinates. Multiply and return. Test with Rectangle rect{{0, 10}, {5, 0}};. Width is 5, height is 10, area is 50. This practices nested structs and chained member access.