[填空题] 下列程序的功能是将数组中的奇数相加。给定的程序不完整,请将程序补充完整。Option Base 1 Private Sub form_Click() Dim k As Integer
19 查阅
[填空题] 下列程序的功能是将数组中的奇数相加。给定的程序不完整,请将程序补充完整。
Option Base 1
Private Sub form_Click()
Dim k As Integer
Dim Total As Integer
Dim n
n = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
For k = 1 To UBound(n)
If 【13】 Then
Total = Total + n(k)
End If
Next k
Print Total
End Sub
参考答案: