# Geometry Meets Computer Science

Example 1: Suppose you have a string of 6 integers such as: 000340

These digits represent the three co-ordinates on the Cartesian plane $$(0,0),(0,3)$$ and $$(4,0)$$.

If lines are drawn to connect each of the points, you form a triangle. Your task is to calculate the area of this triangle (given its co-ordinates). Clearly the above triangle has an area of 6 units squared.

Example 2:

Suppose you have a string of 6 integers such as: 556739

These digits represent three co-ordinates on the Cartesian plane $$(5,5), (6,7), (3,9)$$.

If lines are drawn to connect each of these points, you form a triangle. After doing the calculations, the area of the above triangle has an area of 4 units squared.

You are provided with a text file containing the co-ordinates for each triangle.

Find the triangle with the largest area. Report the value for the area to one decimal place

Details and Assumptions

• Each string in the text file will always contain 6 non-negative integers and the $$x$$ and $$y$$ value of each co-ordinate will always be a integer between 0 and 9. In other words, the given co-ordinates will always be in the first quadrant.
×