题目内容
(请给出正确答案)
[单选题]
有如下VB程序段:a(1) = 1:a(2) =1:b(1) =1:b(2 ) = 2For i = 3 To 5a(i) = a(i-1) + a(i-2)b(i) = b(i-1) + a(i)Next i执行该程序段后,数组元素b(5)的值为()
A.4
B.5
C.8
D.12
答案
D、12
如果结果不匹配,请 联系老师 获取答案
A.4
B.5
C.8
D.12
D、12
A.5
B.7
C.8
D.9
A.58,9,26,11,15,38
B.58,38,26,11,15,9
C.15,38,26,11,58,9
D.58,38,26,15,11,9
A.87, 45, 36, 17, 22
B.17, 22, 36, 45, 87
C.17, 22, 36, 87, 45
D.87, 45, 17, 36, 22
A.2:4 6 8
B.2:8 6 4
C.3:4 6 8
D.3:8 6 4
A.0
B. 1
C. 3
D. 6
设有如下程序段:
intj=0,sum=1;
do{
sum+=j++;}
while(j<6);
printf("%d\n",sum);
上述程序段的输出结果是______。
有如下的程序片段,该程序片段的执行完后,共执行循环______次。 Private Sub command1_ Click() total =0 Counter = 1 do Print Counter total = total + Counter Print total, "111" Counter = Counter + 1 if total >= 10 then exit do End if Loop while Counter <= 10 End Sub
A.是死循环
B.循环执行二次
C.循环执行一次
D.有语法错误
A.3,2,0
B.3,2,-1
C.4,3,-1
D.5,-2,-5