MathSqrt

2019/07/17 19:00
5

double MathSqrt( double x)

MathSqrt関数はxの平方根を返す。もしxが負の数であればMathSqrt関数は無限大を返す(NaNと同等)。

Parameters:
x - 正の数値
Sample:
double question=45.35, answer;
answer=MathSqrt(question);
if(question<0)
Print(“Error: MathSqrt returns “,answer,” answer”);
else
Print("The square root of “,question,” is ", answer);
//Output: The square root of 45.35 is 6.73

コメント