#include stdio.h#include math.hint main () {printf(Square root of %lf is %lf\\n, 4.0, sqrt(4.0) );

编程学习网为您整理以下代码实例,主要实现:C语言库sqrt()函数,希望可以帮到各位朋友。

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

int main () {
   printf("Square root of %lf is %lf\n", 4.0, sqrt(4.0) );
   printf("Square root of %lf is %lf\n", 5.0, sqrt(5.0) );

   return(0);
}