im writing a calculator programme for my project. But i dont know how to find Tan, Cos, Sin. Any one can help I would appreciate that. what is the formula
im writing a calculator programme for my project. But i dont know how to find Tan, Cos, Sin. Any one can help I would appreciate that. what is the formula
Math.h?
Or do you have to write all of the functions? Which I'm sure Wikipedia usually has some good function descriptions you can follow.
Be careful to note that in math.h, these functions expect the angle in radians, not degrees.
yeah i want to write the whole programme. I already have 9 different functions already, just want tan, cos, sin. i include math.h header file already
Well when all the functions have been already given in math.h why do you want to re-write them ? You can just take the input in degrees from the user and convert it into radians and feed into functions.
Well if you want to know the basics more and write your own sine cosine programs then here you go:
sin x = x - x^3/3! + x^5/5!......
cos x = 1 - x^2/2! + x^4/4!.......
tan x = sin x / cos x
where x is in radians...
convert above equations into program and you are done...