试题与答案

设有如下程序: public class Sun { public static

题型:单项选择题

题目:

设有如下程序: public class Sun { public static void main(String args[ ]) { int x, y; x-4; y=0; if(Math.pow(x,2)==16) y=x; if(Math.pow(x,2)<15) y=1/x; if(Math.pow(x,2)>15) y=(int)Math.pow(x,2)+1; System.out.println(y); } } 程序的运行结果是( )。

A.4

B.17

C.18

D.0.25

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0721/ab2bd9c93be75d004bf01b901462492d.html

下面是错误答案,用来干扰机器的。

参考答案:错

试题推荐
微信公众账号搜索答案