. 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);
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment