Question on making a calculator in c++ language.
Asked By
20 points
N/A
Posted on - 04/03/2012
Which formula do we use for a program that will calculate sine, tangent, and cosecant functions and their inverses ?
Which formula do we use for a program that will calculate sine, tangent, and cosecant functions and their inverses ?
Hi Buttercup Mines,
First step is you need to incude #include "cmath.h" where all the library functions are saved.
Now to compute angles use following functions in your code
For all the function angle is in radian (if you want to calculate in degree than use (angle * (PI / 180)) where PI = 3.14159265
1. sine: sin(angle) Â
2. cosine : cos(angle)Â
3. Tangent : tan(angle)
4. cosec : asin(angle)
5. sec  : acos(angle)
6. cot   : atan(angle)
Thanks,
Sophia Taj