> First: Please post using code tags, I'm not saying this a third time :) ...
> void mySquareRootFunction (double x)
, you declared your function to return a value of type void
, why did you do that? Your function has to return something from type double
...
> double z = sqrt(x);
Before you take the square root from a number you should first check whether it's negative :) ...