I need to code y= (-b + (b^2 – 4ac)^1/2 )/2a
Variables a,b,c,and y are of type float.
And for this code the square root is exactly the same as it is IRL, like Sqrt 16=4
Thanks alot![]()
This is a discussion on Coding help. within the C++ Programming forums, part of the General Programming Boards category; I need to code y= (-b + (b^2 – 4ac)^1/2 )/2a Variables a,b,c,and y are of type float. And for ...
I need to code y= (-b + (b^2 – 4ac)^1/2 )/2a
Variables a,b,c,and y are of type float.
And for this code the square root is exactly the same as it is IRL, like Sqrt 16=4
Thanks alot![]()
So, what have you tried?
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
idk how to code it, so i haven't tried anything!!
Start with showing us how you would write the expression (b^2 – 4ac) as C++ code. If you cannot do that, then you need to re-read your learning material.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
fairly simple...break it up into parts. like for instance code the parenthesis first then move outwards till you've finished it.
We shouldn't be quick to criticize unless we can do better.
Code:public function __clone() { die ( "I'm one of a kind" ); }