Get the square root : Square Root « Math « C / ANSI-C






Get the square root


#include <stdio.h>
#include <math.h> /* needed by sqrt() */

int main(void)
{
  double answer;

  answer = sqrt(20.0);
  printf("%f", answer);

  return 0;
}

 

           
       








Related examples in the same category

1.Calculate square root: how to use sqrt