Function name : sqrt
Header file : <math.h>
Usage : double sqrt(double x);
Function : Calculate the square root of a non-negative real number
Parameters : double x The non-negative real double precision number to be operated on
Return value : Returns the square root of a non-negative real number
Program example : Find the square root of double precision x and output the result
#include<stdio.h>#include<math.h>intmain(void){doublex=4.0,result;result=sqrt(x);printf(Thesquarerootof%lfis%lfn,x,result);return0;}
Running results:
Thesquarerootof4.000000is2.000000