In the known triangle ABC, a = 8, B = 7, angle B = 60 °, it is your great God to find the edge C and the area of triangle ABC

In the known triangle ABC, a = 8, B = 7, angle B = 60 °, it is your great God to find the edge C and the area of triangle ABC


Through point C, make CD perpendicular to AB, because angle B = 60 ° so angle BCD = 30 ° so BD is equal to 1, 2A = 4 so CD is equal to 4 root sign 3, because B = 7 so ad = 1 so C = 5 s triangle ABC = C * CD = 20 root sign 3



In the triangle ABC, we know that a = 2 times the root sign 3, B = 6, a = 30 degrees, find the area of B and s triangle ABC, and seek the help of big God


B = 60 degrees. The area of the triangle is 6 times the root 3



Write a java program: the three sides of the triangle are a = 3, B = 4, C = 5, judge whether it is a legal triangle (the sum of the two sides is greater than the third side), and calculate the area


/*
Using Helen's formula to evaluate directly by trilateration
*/
import java.util .*;
import java.io .*;
class Main
{
static Scanner in;
static PrintWriter out;
public static void main(String[] args)throws IOException
{
in=new Scanner( System.in );
out=new PrintWriter( System.out );
int[] bian=new int[3];
double p=0;
for (int i=0;ibian[2])
{
out.println (p);
out.println (this is a legal triangle with an area of:+ Math.sqrt (p * (p-bian [0]) * (p-bian [1]) * (p-bian [2])); / / area formula
}
else
{
out.println "This is not a legal triangle!";
}
in.close ();
out.close ();
}
}