Question: Please help me code this C++ programming challenge. Trig Function Table 1.Program Objective Write a program that asks the user to enter two angles in

Please help me code this C++ programming challenge.

Trig Function Table 1.Program Objective

Write a program that asks the user to enter two angles in degrees and then generates a table displaying the two angles and the cosine, sine, hyperbolic cosine, and hyperbolic sine of these two angles. Read ALL of this CAREFULLY.

Program Specifications Your program must use variables of type double and with appropriate names. Note that angles may be real numbers and may be positive or negative. Remember to convert angles from degrees to radians before calculating their cos, sin, etc. Use acos(-1.0) to assign a value to your constant for PI. Dont forget to add the appropriate preprocessor directives to use math functions and output manipulators. You are NOT required to use a loop (repetition structure) in your program. Your program must interact with the user and produce output exactly as follows (note the spaces and spelling, more details below). The example below shows program output if the user enters a first angle of -180 degrees and a second angle of 180 degrees.

Enter an angle between -360 and 360 degrees: -180 Enter an angle between -360 and 360 degrees: 180 Angle (degrees) cos sin cosh sinh -180.0 -1.00 -0.00 11.59 -11.55 180.0 -1.00 0.00 11.59 11.55

Construct the first line of the table asfollows: print Angle (degrees)in a field 15 characters wide print each of cos, sin, cosh, sinh in a field 9 characters wide and right justified Print the angles in the second and third rows of the table with one decimal place, in a field 15 characters wide, and left justified. Print each of the cos, sin, cosh and sinh values in the second and third rows of the table with two decimal places, in a field 9 characters wide, and right justified Note: You MUST use output format manipulators to format your output. Do NOT simply print a certain number of spaces between values in your table. Your code will be tested with various input angles that may result in trig values with varying numbers of significant figures. Using output format manipulators correctly will ensure that your programs output will be correct whereas simply printing spaces will not

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 Programming Questions!