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++ Language Reference - hypot http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   hypot

   Usage
   #include <math.h>
   double hypot(double x,double y);

   Description
   Calculates the length of the hypotenuse of a right triangle with sides
   of length x and y. The hypotenuse is the value obtained by taking  the
   square root of the sums of the squares of x and y (sqrt(x*x+y*y)).

   Example
   #include <stdio.h>
   #include <math.h>
   main()
   {
   double x,y;
        printf("Enter floating point x: ");
        scanf("lf",&x);
        printf("Enter floating point y: ");
        scanf("lf",&y);
        printf("The hypotenuse of [%f, %f] is [%f]\n",x,y,hypot(x,y));
   }

   Return Value
   The hypotenuse of a triangle with sides x and y.


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