Problem K
Trials and Triangulations
More math? You got it. That’s what computers do, they compute.
Heron’s formula gives the area,
Write a program that prompts for three integers,
Hint: You can use the sqrt function in the math module.
Input
Input consists of three lines. The first line consists of
one integer
Output
Output one line with one floating point number
Sample Input 1 | Sample Output 1 |
---|---|
1 1 1 |
0.433012701892219 |
Sample Input 2 | Sample Output 2 |
---|---|
1 2 3 |
0.000000000000000 |
Sample Input 3 | Sample Output 3 |
---|---|
2 2 3 |
1.984313483298443 |
Sample Input 4 | Sample Output 4 |
---|---|
12 9 19 |
41.952353926806062 |
Sample Input 5 | Sample Output 5 |
---|---|
5 4 3 |
6.000000000000000 |
Sample Input 6 | Sample Output 6 |
---|---|
5 12 13 |
30.000000000000000 |