typedef struct { double x; double y; } XY; typedef struct { XY vertex[3]; } Triangle; void InputTriangle( Triangle * ); double CalcArea( Triangle ); XY CalcCentroid( Triangle );