题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-01-13 04:10:56

[单项选择]下列程序的运行结果是______。
Public class sun

Public static void main (String args[])

int 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

更多"下列程序的运行结果是______。 Public class sun"的相关试题:

[单项选择]下列程序的运行结果是( )。 public class Sun { public static void main(String args[]) { int a=1; int b=1; for(int i=1;i<=3;i++) { a=a+b; b=b+a; } System.out.println(a+" "+B) ; } }
A. 6 6
B. 5 8
C. 13 21
D. 34 55
[单项选择]下面程序的输出结果是( )。 public class Sun { public static void main(String args[]) { int[] a={1,2,3,4); int j=1,s=0; for(int i=3;i>=0;i--) { s=s+a[i]*j; j=j*10; } System.out.println(s); } }
A. 1234
B. 21
C. 43
D. 4321
[单项选择]下面程序的运行结果是( )。
public class Test
public static void main (String args[])
int c=5;
System. out. println (c);
System. out. println (c++);
System. out. println (c);


A. 5
B. 5
C. 6
D. 6
[单项选择]以下程序的运行结果为( )。 public class Sun { public static void main(String args[]) { String x="A",y="B",z="C"; for(int m=1;m<=2;m++) { x=y; y=z; z=x; } System.out.println(x+y+z); } }
A. ABC
B. BCA
C. BCB
D. CBC
[单项选择]下列程序的运行结果是( )。
Public class sun

Public static void main(String args[])

int 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
[单项选择]下列程序的运行结果是( )。
public class Sun

public static void main(String args[ ])

int number,digits;
number=53;
if(number<10)
digits=1;
else
if(number<100)
digits=2;
else
diglts=3;
System.out.println(digits);


A. 1
B. 2
C. 3
D. 0

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码