[二级VB试题天天练]VB考试试题15
分类: 计算机
时间: 2024-05-07 09:34:43
作者: 全国等级考试资料网
19.数组练习(3)
下列程序段运行后,k的值是多少?
Dim x(1 To 10) As Integer
Dim p(1 To 4) As Integer
Dim k As Integer
Dim i As Integer
For i = 1 To 10
x(i) = i + 1
Next
For i = 1 To 4
p(i) = x(i * 2)
k = k + p(i) * 2
Next
Print k