0

How to add trigonometry n inverse trigonometry in c++ ?

i m trying to make a scientific calculator using switch case!

10th Jun 2018, 1:07 AM
Bunny
Bunny - avatar
2 ответов
+ 2
#include <math.h> #define PI 3.14159265 int main () { double angle, result; angle = 30.0; result = sin (angle*PI/180); //sin30 angle = asin(result) * 180 / PI; //30.0 return 0; } triginometric function needs angle (in radian) as parameter. Here 30 degrees in converted into radian as: 30 * PI / 180 This value is supplied to sin function to calculate the value of sin30 Inverse trigonometric function needs values according to the value of respespective trigonometric functions like. asin can have value between -1 to 1, atan can have any number ...
10th Jun 2018, 1:39 AM
Gopal Gautam
Gopal Gautam - avatar
+ 1
thnx but can u explain what is written in parentheses n why
10th Jun 2018, 1:44 AM
Bunny
Bunny - avatar