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
上面只是进行比较和输出结果,至于输入的过程和输出的方式有很多种,你可以自己选择一种,我就不说了,我也是初学的,如有不到之处还请见谅
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
'这是在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