cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
how to implement equation
how to implement equation
Oct 2, 2015 at 11:49am UTC
Hassaan299
(3)
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〗^
Oct 2, 2015 at 11:54am UTC
Peter87
(11234)
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.