单项选择题

下面程序段的输出结果是
public class Test
public static void main(String args [])
int a,b;
for(a=1,b=1;a<100;a++)
if(b>=10)break;
if(b%2==1)
b+=2;
continue;


System.out.println(

A.;

A) 5
B.6
C.7
D.101
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序段的输出结果为 public class Test public static void main(String args[]) boolean a,b,c; a=(3<5); b=(a==true); System.out.printin( a= +a+ b= +b) ; c-(b==false); System.out.println(b= +b+ e= +c) ;
A.a=true b=false
b=true c=false
B.a=true b=false
b=true c=true
C.a=true b=true
b=true c=false
D.a=false b=false
b=true c=false
单项选择题
下面程序段的输出结果是 public class Test 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.17
B.31
C.33
D.35
相关试题
  • 下面程序段的输出结果是 class Test pub...
  • 能将程序补充完整的选项是 class Person...
  • 下面程序段的输出结果是 public class T...
  • 下面程序段的输出结果为 public class T...
  • 设a=8,则表达式少>>>1的值是