1. Engineering
  2. Computer Science
  3. 2 write a program that prompts a user to enter...

Question: 2 write a program that prompts a user to enter...

Question details

2. Write a program that prompts a user to enter the lengths of sides and angles for the two triangles described below. The program should calculate the length of the side of the triangle indicated below. Print the two answers to 3 decimal places onto the console screen Triangle 1 Read in the value of the angle, alpha, and the length, a, of the side indicated in the picture below. Calculate the length of the hypotenuse, c, of this right triangle: Test your program with: alpha 32 a-4.5 Triangle 2 Read in the value of the angle, beta, and the length, a, of the side indicated in the picture below. Calculate the length of the side opposite of the angle, b, of this right triangle: Test your program with: beta -40 a-2.2

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution