Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>sqrt</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
sqrt

Usage

   #include <math.h>
   double sqrt(double x);

   ANSI

Description

   sqrt returns the square root of x. If x is negative then a DOMAIN error
   occurs.


Example 

   #include <stdio.h>
   #include <math.h>
   #include <stdlib.h>

   int main()
   {
       double x;
       for(x = 1.0; x <= 20.0; ++x)
           printf("The square root of %.4f is %.4f\n",
                   x,sqrt(x));
       return EXIT_SUCCESS;
   }

Return Value

   sqrt returns the double result.

See Also

   exp, log, pow



See Also: exp log pow

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson