单项选择题
有如下程序 public class Sun { public static void main (String args[ ]) { int a=2, b=1, c=2; if (a<B) if (b<0) if (c<0) c=0; else c++; System. out.println(C) ; } } 上述程序的运行结果是( )。
A.0
B.1
C.2
D.3
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下面程序的输出结果是( )。 public class Sun { public static void main(String args[ ]) { int[] a=new int[11]; int[] p=new int[4]; int k=5; for (int i=1; i<=10; i++) a[i]=i; for(int i=1;i<=3;i++) p[i]=a[i*i]; for (int i=1; i<=3;i++) k=k+p [i]*2; System.out.println (k); } }
A.33
B.28
C.35
D.37
点击查看答案&解析
单项选择题
有如下程序 public class Sun { public static void main (String args[ ]) { int x=0; int n=0; while (x<50) { x=(x+2)*(x+3); n=n+1; System.out.println (n+ 和 +x); 上述程序的运行结果是( )。
A.1和0
B.2和72
C.3和50
D.4和168
点击查看答案&解析
相关试题
编译下面源程序文件会得到的文件是( )。...
对排序文件的初始状态不作任何要求的排序方...
一个关系数据库文件中的各条记录( )。
下列关于栈的叙述中不正确的是( )。
UDP允许传输的数据包最大为( )。