柠檬试题库
search
首页 计算机 公务员 驾照 关于

有以下计算公式
若程序前面已在命令行中包含math.h文件,不能够正确计算上述公式的程序段是


  • A.if(x>=0) y=sqrt(x); if(x<0) y=sqrt(-x);
  • B.if(x>=0) y=sqrt(x); else y=sqrt(-x);
  • C.y=sqrt(x); if(x<0) y=sqrt(-x);
  • D.y=sqrt(x>=0?x :-x);
热度🔥558
参考答案:C
解析:打开微信小程序查看本题解析