vb.net数组练习 数组vb编程问题
vb.net 数组求最值
dim A(9) as integer
创新互联是一家专注于网站建设、做网站与策划设计,遂平网站建设哪家好?创新互联做网站,专注于网站建设十年,网设计领域的专业建站公司;建站业务涵盖:遂平等地区。遂平做网站价格咨询:18982081108
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(j + 1)
Next j
ReDim Preserve a(10 - 1)
Exit For
End If
Next i
If i 10 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 = StrPrt Grp(j)
Next j
For j = 0 To i - 1
StrPrt = StrPrt Grp(j)
Next j
Me.Print StrPrt
Next i
End Sub
文章名称:vb.net数组练习 数组vb编程问题
当前网址:http://pwwzsj.com/article/dojjodp.html