实例 C 语言使用 math 函数求一个数的平方根

x
 
#include <stdio.h>
#include <math.h>
int main() {
  printf("%f", sqrt(16));
  return 0;
}
                    

输出结果

4.000000