[單項(xiàng)選擇題] 有過程如下:Sub fact (m As Integer, total As Long) Dim i As Integer total =
2021-07-20
[單項(xiàng)選擇題] 有過程如下:Sub fact (m As Integer, total As Long) Dim i As Integer total = 1 for i = 1 To mtotal = total*i Next iEnd Sub調(diào)用它的事件過程如下:Private Sub Command1_ Click () Dim tot As Long Dim a As Integer a = Val InputBox (“請輸入數(shù)據(jù)”)) Call fact (a, tot) Print totEnd Sub則輸入數(shù)據(jù)5,運(yùn)行結(jié)果為 ______。
A.100
B.120
C.200
D.50
正確答案:B
參考解析:本題難點(diǎn)是實(shí)、虛參數(shù)傳遞的問題。tot按ByRef參數(shù)傳遞。子過程的功能是計(jì)算 n!,“5!=120”。
詞條內(nèi)容僅供參考,如果您需要解決具體問題
(尤其在法律、醫(yī)學(xué)等領(lǐng)域),建議您咨詢相關(guān)領(lǐng)域?qū)I(yè)人士。