题目内容

下列哪个语句可以实现选择结构( )

A. for
B. while
C. else
D. if

查看答案
更多问题

以下代码的输出结果是()。publicclassTest{publicstaticvoidmain(String[]args){double[]price=newdouble[5];price[0]=98.10;price[1]=32.18;price[2]=77.75;for(inti=0;i<=price.length;i++){System.out.print((int)price[i]+ " ");}}}

A. 98 32 77 0 0
B. 98 32 78 0 0
C. 98 32 78
D. 编译出错

定义一个数组String[]fruits={"苹果","香蕉","梨","草莓","橘子","橙子","菠萝"},数组中的friuts[6]指的是()。(单选题)

A. 苹果
B. 橙子
C. 菠萝
D. 数组越界

如下程序的运行结果是( )intx=92;chars;if(x>=70)s=‘C’;elseif(x>=80)s=‘B’;elseif(x>=90)s=‘A’;elses=‘D’;

A
B
C
D

2012年培养学员25万人,每年增长23%,请问按此增长速度,到哪一年培训学员人数将达到100万人?intyear=2012;doublestudents=25;while( students<=100){year++;}System.out.println("第"+year+"年够100万人!");1.循环操作分别是什么?

A. students = students *(1+0.23);
B. double students = students *1+0.23;
C. students = students *0.23;
D. students = students - students *0.23

答案查题题库