Hello, this is my 2nd time posting here. My prof said that in order to use trigonometric function, I need to convert the angle from degrees to radian. My idea is to define the angle in degrees in term of z. ie: z = angle * ( PI / 180)
But then I don't know how to proceed giving the value of angle. How can I assign the values for my angles?
If my code is already wrong from the start please tell me.
My code need to give the following output:
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
On line 12 you do use the value of 'angle1'. What is the value at that point? The variable was declared on line 10, but it has not been initialized with known value, nor set to specific value before line 12. In other words, at that point the value of angle1 is undefined.
On line 22 the user gives a (presumably) valid value for angle1 (in degrees). If you want to convert that value into radians, surely you must do it after you have got the value?