/* (Start of program header comment)
* Copyright and version Declaration section of the program
* Copyright (c) 2016, Guangzhou Science and Technology Trade Vocational College, Department of Information Engineering students
* All rights reserved.
* File name: Blue Bridge Cup title
* Author: Pengjunhau
* Completion Date: April 01, 2016
* Version number: 001
* Description part of task and solution method
* Input Description: None
* Description of the problem:
There are many reasons for high prices, such as land transfer prices. Given the high land price, the area of the land must be calculated carefully. Unfortunately, some plots are irregularly shaped, such as the Pentagon shown in "1.jpg".
It is generally necessary to divide it into multiple triangles to calculate.
It is known that triangular areas need to be made with Helen's theorem, see "2.jpg"
The data for each edge length is as follows:
AB = 52.1
BC = 57.2
CD = 43.5
DE = 51.9
EA = 33.4
EB = 68.2
EC = 71.9
* Program output: Based on these data, the area of Pentagon plots is calculated. Rounded to a decimal after two bits. Write only the results, do not source code!
* End of comment on the program head
*/
On the code:
public class Main {
public static void Main (string[] args) {
Double K1 = (33.4+68.2+52.1)/2;
Double NUM1 = math.sqrt (k1* (k1-33.4) * (k1-68.2) * (k1-52.1));
Double K2 = (71.9+68.2+57.2)/2;
Double num2 = math.sqrt (k2* (k2-71.9) * (k2-68.2) * (k2-57.2));
Double K3 = (71.9+51.9+43.5)/2;
Double num3 = math.sqrt (k3* (k3-71.9) * (k3-51.9) * (k3-43.5));
Double num = num1+num2+num3;
System.out.printf ("%.2f", num);
}
}
The third annual Blue Bridge Cup Javac Group _ Land Surveying