C++开根号用什么字母表示?
来源:百度知道 编辑:UC知道 时间:2024/05/07 13:17:20
加头文件#include<math.h>
然后在语句中用函数 sqrt()
比如3开根号,就是 sqrt(3)。
加头文件#include<math.h>
然后在语句中用函数 sqrt()
比如3开根号,就是 sqrt(3)
要不百度下
用函数
或者用
power(X ,1/2);
还要加上
#include <math.h>
才能用
sqrt();
一个字母不够,要用4个字母外加一对括号,即:sqrt(...)