Question: Write a program for calculating the sides of a 3 0 / 6 0 / 9 0 degree right triangle. This program should ask the

Write a program for calculating the sides of a 30/60/90 degree right triangle. This program should ask the user to input the length of the hypotenuse in meters (e.g.10 entered for 10 meters). Then the program will assume a 30/60/90 degree right triangle and calculate the lengths of sides a and b. Recall that side a=hyp*Cos(30) and b=hyp*Sin(30). All angles must be in radians before passing them to the trig functions (ie.180 degrees =3.14159 radians). Make your printout nice and descriptive using printf() with the necessary formatting for your data. If you choose to use floats or doubles just display 2 decimal places in your output. Please resist the temptation to embellish this assignment with other angles and features. You can do that after you have submitted your program written as described above. Note: Using Math.h and trig functions are required. The point is to successfully use math.h. Also, some Google searching for math.h should lead to a description of math.h so all of the functions can be seen and studied. Verify the calculations performed by your program by checking them with your calculator. Upload a .pdf file containing screenshots of your code and output.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!