i want ot insert trignomatric function in my calculator ..how to use trignomatric ratioes and get correct answar in c++ native win32 console application
plzz help me wd example
1) The universe has changed and cos and sin have different answers now.
2) Your code is wrong.
3) Your code is giving you a correct answer but you don't understand what it's saying.
22/7 is a poor substitute for PI. It's only used when you're doing all your calculations by hand.
acos(-1.0) should give you a good value for PI. This is because there are 2PI radians in a full circle. So a semi-circle has PI radians. cos(PI) is -1, so arc cos(-1) is PI. It's not obvious without a diagram of a unit circle. http://pubs.opengroup.org/onlinepubs/007908799/xsh/acos.html