Hey guys, I'm new here, and am new to computer programming. I'm in my first C++ class, and our teacher gave us this exercise. It seems a bit ahead of where we are currently in our studies, and I'm completely lost as to how to even get started. I understand that you cannot give answers to homework questions, but I thought maybe I could possibly get enough good help/support here to at least get me going in the right direction. This is more of an exercise than an assignment, but I suppose you have to treat all things like assignments. I'll provide the full instructions below and then perhaps we can discuss it:

I appreciate any and all help. Whether or not I get it right, I have to turn something in tonight.

Thanks.

**Develop an algorithm that will take an angle,**

measured in degrees, between ¬90° and +90° ( ¬90 <

x < 90 ) and calculate the sin, cos and tan of the

angle, and implement the algorithm in C++.

Your program should validate the input for the

angle, making sure it falls within the given range

and notifying the user if it does not. Your angle

and sin, cos, tan and all numbers should be doubles.

The output should be formatted this way:

Following the input, there should be a line of 40

asterisks then a table of outputs, then another line

of 40 asterisks, with blank lines between the

asterisks and outputs:

****************************************

^

^Angle sin cos tan

±xx.xx^^^±x.xxxx^^^±x.xxxx^^^±x.xxxx

^

****************************************

The headings "Angle, sin," etc. are right justified

over their columns. The angle is typed out with two

decimal places. The sine, cosine & tangent have 4

decimal places and are right justified under their

column headings. There are 3 spaces between the

fields for each number. (If the outputs are too big

or too small to fit in this format, don't worry

about that.)

For example, if the angle was ¬65.5°, the output

would be:

****************************************

Angle sin cos tan

¬65.50 ¬0.9100 0.4147 ¬2.1943

****************************************

Note that C++ expects angles to be given in radians.

Your algorithm will need to convert that inputted

angle from degrees to radians for the calculations.

For full credit you need to use a "constant

variable" for the value of pi &/or the value of the

conversion factor between degrees and radians.measured in degrees, between ¬90° and +90° ( ¬90 <

x < 90 ) and calculate the sin, cos and tan of the

angle, and implement the algorithm in C++.

Your program should validate the input for the

angle, making sure it falls within the given range

and notifying the user if it does not. Your angle

and sin, cos, tan and all numbers should be doubles.

The output should be formatted this way:

Following the input, there should be a line of 40

asterisks then a table of outputs, then another line

of 40 asterisks, with blank lines between the

asterisks and outputs:

****************************************

^

^Angle sin cos tan

±xx.xx^^^±x.xxxx^^^±x.xxxx^^^±x.xxxx

^

****************************************

The headings "Angle, sin," etc. are right justified

over their columns. The angle is typed out with two

decimal places. The sine, cosine & tangent have 4

decimal places and are right justified under their

column headings. There are 3 spaces between the

fields for each number. (If the outputs are too big

or too small to fit in this format, don't worry

about that.)

For example, if the angle was ¬65.5°, the output

would be:

****************************************

Angle sin cos tan

¬65.50 ¬0.9100 0.4147 ¬2.1943

****************************************

Note that C++ expects angles to be given in radians.

Your algorithm will need to convert that inputted

angle from degrees to radians for the calculations.

For full credit you need to use a "constant

variable" for the value of pi &/or the value of the

conversion factor between degrees and radians.

I appreciate any and all help. Whether or not I get it right, I have to turn something in tonight.

Thanks.

## Comment