单项选择题

下面程序段的输出结果是( )。
publiCClaSsTest
publicstatic voidmain(SthngarSs[])
inta,b;
for(a=1,b=1;a<(z100;a++)
if(b>=10)break;
if(b%2=1)
b+=2;
continUe;

System.out.println(a);

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

单项选择题
下面程序段的输出结果为( )。 pubUCClassTeS public static voidmain(StringargS[]) booleaha,b,c; a=(3<5); b=(a==tme); System.Out.phntln( a= +a+ b= +b); c=(b==false); SyStem.out.println( b= +b+ C= +c);
A.a=tme b=falSe
B.a=true b=false
b=true c=false
b=true
C=tme
C.a=true b=true
D.a=falSe b=false
b=true c=falSe
b=tme
c=falSe
单项选择题
下列程序的运行结果是( )。 Publicclasssun Publicstaticvoidmain(Stringargs[]) intx=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(x92)+1; system,out.println(y);
A.4
B.17
C.18
D.0.25
相关试题
  • 执行下列程序时,会产生什么异常( )。 ...
  • 下面for循环语句的执行结果是( )。 for...
  • 下列程序的输出结果是( )。 publicclas...
  • 下面程序段的输出结果是( ) classTest...
  • 下列程序的运行结果是( )。 Publicclas...