单选题
C语言
2008-03-19
有以下计算公式y=
-x的平方根 x<0
若程序前面已在命令中包含math.h文件,不能正确计算上述公式的是( )。
A.if(x>=0) y=sqrt(x);
B.y=sqrt(x);
else y=sqrt(-x); if(x<0) y=sqrt(-x);
else y=sqrt(-x); if(x<0) y=sqrt(-x);
C.if(x>=0) y=sqrt(x);
D.y=sqrt(x>=0?x:-x);
if(x<0) y=sqrt(-x);
if(x<0) y=sqrt(-x);
参考答案
B
答案解析
暂无解析
你可能感兴趣的试题
A.(EXP==0)
B.(EXP!=0)
C.(EXP==1)
D.(EXP!=1)
A.741
B.963
C.852
D.875421
A.isupper(
B.’A’<=c<=’Z’
C.’A’<=c&&c<=’Z’
D.c<=(‘z’-32)&&(‘a’-32)<=c