vb.net数组练习 vb6 数组

vb.net数组求最值dim A(9) as integer
dim x as integer=A(0)
dim i as integer
for i=1 to 9
if xA(i) then x=A(i)
next
messagebox.show x
上面只是进行比较和输出结果,至于输入的过程和输出的方式有很多种 , 你可以自己选择一种,我就不说了,我也是初学的,如有不到之处还请见谅
利用VB.NET编写:已知数组A=Array(7,6,5,1,8,5,3,9,4),编写一程序,删除数组中值为x(例如为3)...For i = 0 To 10 '假设数组长度为10
If a(i) = 3 Then
For j = i To 10 - 1
a(j) = a(j1)
Next j
ReDim Preserve a(10 - 1)
Exit For
End If
Next i
If i10 Then
For k = 0 To 10 - 1
Print a(k)
Next
Else
For k = 0 To 10
Print a(k)
Next
End If
vb.net 数组显示矩阵的一道题'这是在vb6中的代码,在vb.net中基本差不多 , 你可以参考一下
Private Sub cmdCommand1_Click()
Me.AutoRedraw = True
Dim Grp
Grp = Array(1, 2, 3, 4, 5)
Dim i, j As Long
Dim StrPrt As String
For i = 0 To UBound(Grp)
'i为位移量
StrPrt = ""
For j = i To UBound(Grp)
StrPrt = StrPrtGrp(j)
Next j
For j = 0 To i - 1
StrPrt = StrPrtGrp(j)
Next j
Me.Print StrPrt
Next i
End Sub
【vb.net数组练习 vb6 数组】vb.net数组练习的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于vb6 数组、vb.net数组练习的信息别忘了在本站进行查找喔 。

    推荐阅读