Option Base 1
private Sub Form_Click()
Dim Xyz (10)
For i =2 To 10 Step 2
Xyz(i)=10-i+i Mod 2
For i =1 To 10
Print Xyz (i);
Next i
End Sub
求运行结果!
參考答案:Option Base 1 '数组下限从1开始
private Sub Form_Click()
Dim Xyz (10)
For i =2 To 10 Step 2 ‘从2开始2 4 6 8 10
Xyz(i)=10-i+i Mod 2
For i =1 To 10
Print Xyz (i);
Next i
End Sub
结果错误 少了个next