how to implement equation

i am a student of programming. i am facing dificultyin implementing the equation. the equation are
d= (v cos⁡θ )/g(v sin⁡〖θ+√((v sin⁡〖θ)^2+〗 2gy_o )〗)
and
〖〖y=y_o+ x tan⁡〖θ-(gx^2)/(2(v cos⁡θ))〗〗_2〗^
Have a look at the <cmath> header. It has a lot of mathematical functions.

http://www.cplusplus.com/reference/cmath/

Note that ^ is not used for exponents in C++. Instead you can use the pow function.
Topic archived. No new replies allowed.