62 492
Assignments Done
98,8%
Successfully Done
In June 2018

Answer to Question #57614 in Java | JSP | JSF for Kenya

Question #57614
. In right triangle ABC below, angle C is 90 degrees, b = 8, and c = 10. Write a Java program that calculates side a, angle A, and angle B. Express all measures accurate to three decimal places.
Expert's answer
public class Triangle {

public static void main(String[] args) {

double angleC = 90;
double b = 8;
double c = 10;
double angleA, angleB, a;

a = Math.sqrt((c * c) - (b * b));
angleA = Math.toDegrees(Math.asin(a / c));
angleB = angleC - angleA;

System.out.printf("Side a = %.3f \n", a);
System.out.printf("Angle A = %.3f \n", angleA);
System.out.printf("Angle B = %.3f \n", angleB);

}

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions