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.
1
Expert's answer
2016-02-10T00:01:18-0500
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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS