Private Sub form_activate()
Dim a
a = Array(1, 2, 3, 4, 5)
For i = LBound(a) To UBound(a)
a(i) = i * a(i)
Next i
Print i, LBound(a), UBound(a), a(i)
End Sub和
Private Sub form_activate()
Dim a
a = Array(1, 2, 3, 4, 5)
For i = LBound(a) To UBound(a)
a(i) = i * a(i)
Next i
Print i, LBound(a), UBound(a), a(i-1)
End Sub第一道题答案:程序出错
第二道题答案:5 0 4 20
还有以下这题
for i = 1 to 3
for j =5 to 1 step -1
print i*j
next j
next i
求语句print i*j执行次数、i、j的值
Dim a
a = Array(1, 2, 3, 4, 5)
For i = LBound(a) To UBound(a)
a(i) = i * a(i)
Next i
Print i, LBound(a), UBound(a), a(i)
End Sub和
Private Sub form_activate()
Dim a
a = Array(1, 2, 3, 4, 5)
For i = LBound(a) To UBound(a)
a(i) = i * a(i)
Next i
Print i, LBound(a), UBound(a), a(i-1)
End Sub第一道题答案:程序出错
第二道题答案:5 0 4 20
还有以下这题
for i = 1 to 3
for j =5 to 1 step -1
print i*j
next j
next i
求语句print i*j执行次数、i、j的值
解决方案 »
- 请问:如何在用MSChart控件做出的曲线图中,当鼠标放在曲线上时能显示曲线的当前值?
- 怎样让程序不用安装即可在没有安装VB的系统上运行
- 如何在vb中使用手形光标
- 如何实现在DATAGRID控件中,显示记录时在左边自动增加一列,显示流水号,流水号从1开始,或者其它那个控件可以实现这个功能.
- SetDIBColorTble的详细作用是什么
- 用vb语句怎样判断字段值有无重复值,非常急!
- 怎么提取combo的运算符
- WM_RBUTTONDOWN消息的消息参数wParam及lParam的意义如何?
- VB ActiveX Control 在從新編譯後在使用出現錯誤
- 在modem如何实现来电显示
- vb 换IP 的问题
- 图像处理中,怎么做细线化这部份?
Print i, LBound(a), UBound(a), a(i)i=5,a(i)中i>4 越界
Print i, LBound(a), UBound(a), a(i)
i=5 a(5) 超过数组的上限
2
print i*j执行次数 15次
i 1 2 3
j 5 4 3 2 1
i=3
j=5
for i = 1 to 3
for j =5 to 1 step -1
print i*j
next j
next i
求语句print i*j执行次数、i、j的值=====================================================
执行 15 次,i=4, j=0