Private Sub Command1_Click()Dim a(1 To 10)For i = 1 To 10a(i) = Val(InputBox("输入第" i "个数"))Next i'原来的数组For i = 1 To UBound(a)Print a(i);Next iPrint'交换数值k = UBound(a)For i = 1 To k / 2m = a(i): a(i) = a(k + 1 - i): a(k + 1 - i) = mNext i'交换后的数组For i = 1 To UBound(a)Print a(i);Next iPrintEnd Sub
回复除特别注明原创外,本站所有文章或图片均不是物联卡官网原创,如侵犯您的利益或版权,请联系我们将立即处理;本文地址http://blog.21863.cn/wulianka/VBgsyVBbxxmjpssr10gs.html
Private Sub Command1_Click()Dim a(1 To 10)For i = 1 To 10a(i) = Val(InputBox("输入第" & i & "个数"))Next i'原来的数组For i = 1 To UBound(a)Print a(i);Next iPrint'交换数值k = UBound(a)For i = 1 To k / 2m = a(i): a(i) = a(k + 1 - i): a(k + 1 - i) = mNext i'交换后的数组For i = 1 To UBound(a)Print a(i);Next iPrintEnd Sub