How would I get the square root in C++, do I have to use a function or something? I am using it for A*A + B*B = C*C, but I want to square root C so it is just C (this is the Pythagoreum Therom if I am not mistaken, except that it uses square root signs, the little 2s, but I don't know how to make them :) ). Any help is appreciated and needed.
Yeah there's a function for that:
Prototype: double sqrt(double num);
Header file: math.h
/*Start of code*/
double num = 9.0;
cout << "The square root of " << num << "is " << sqrt(num);
/*End of code*/
Great, thanks tons. That will help me out alot.
You could also use this:
double pow(double x,double y);
It raises x to the power of y, and returns the result.