(28) 下面程序段的運(yùn)行結(jié)果是
a=1
b=1
Do
a=a + 1
b=b + 1
Loop Until b > 5
Print "k="; a; Spc(4) ; "b="; b + a
A) k=7 b=14
B) k=6 b=6
C) k=4 b=8
D) k=6 b=12
正確答案: D
(29) 以下能夠正確計(jì)算n!的程序是
A) Private Sub Command1_Click()
n=5: x=1
Do
x=x * I
I=I + 1
Loop While I < n
Print x
End Sub
B) Private Sub Command1_Click()
n=5: x=1: I=1
Do
x=x * I
I=I + 1
Loop While I < n
Print x
End Sub
C) Private Sub Command1_Click()
n=5: x=1: I=1
Do
x=x * I
I=I + 1
Loop While I <=n
Print x
End Sub
D) Private Sub Command1_Click()
n=5: x=1: I=1
Do
x=x * I
I=I + 1
Loop While I > n
Print x
End Sub
正確答案: C
相關(guān)推薦:
2009年9月計(jì)算機(jī)等考二級VB模擬題及解析匯總 在VB中利用遠(yuǎn)程數(shù)據(jù)庫的訪問之應(yīng)用舉例