Calculating the area of a triangle using vertex coordinates
Go
Medium
math
Task «Calculating the area of a triangle using vertex coordinates»
Write a Go program that calculates the area of a triangle given the coordinates of its three vertices on a plane. The input consists of six integers (x1, y1, x2, y2, x3, y3), each ranging from -1000 to 1000. The program should output the area of the triangle with an accuracy of two decimal places. It is guaranteed that the triangle is non-degenerate.
Input Format
Six integers separated by spaces: x1 y1 x2 y2 x3 y3
Output Format
One real number — the area of the triangle, rounded to two decimal places.
Examples
Example 1
INPUT
1
OUTPUT
В обработке
Example 2
INPUT
((a2)2b)2
OUTPUT
((a{2}){2}b){2}
Example 3
INPUT
2
OUTPUT
Отправлен
Example 4
INPUT
0 0 0 5 5 0
OUTPUT
12.50
Example 5
INPUT
0 0
3 4
OUTPUT
5.00
main.go