The area of a triangle (structures, function)
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Create a function:
double solve(point a, point b, point c)
This function takes as input the coordinates of points a, b, and c, which are instances of the following structure:
struct point { int x; int y; };
The function should return the area of the triangle formed by these three points. Implement this in C++.
Submissions 547
Acceptance rate 35%