[單項選擇題] 有如下函數(shù)過程: Function lj(x As Integer) As Long Dim s As Long Dim i As Int
2021-07-20
[單項選擇題] 有如下函數(shù)過程:
Function lj(x As Integer) As Long
Dim s As Long
Dim i As Integer
s=0
For i = 1 To x
s=s+ i
Next i
1j= s
End Function
在窗體上添加一個命令按鈕,名為Command1, 編寫事件過程調用該函數(shù):
Private Sub Command1 Click()
Dim i As Integer
Dim sum As Long
For i = 1 To 5
sum = sum + 1j(i)
Next i
Print sum
End Sub
A.25
B.35
C.45
D.55
正確答案:B
詞條內容僅供參考,如果您需要解決具體問題
(尤其在法律、醫(yī)學等領域),建議您咨詢相關領域專業(yè)人士。