1个回答
2014-06-18
展开全部
Private Sub Command1_Click()
Dim i As Integer, j As Integer, n As Integer
Dim x(1 To 10) As Integer
x(1) = 12
x(2) = 6
x(3) = 7
x(4) = 11
x(5) = 21
x(6) = 22
x(7) = 4
x(8) = 10
x(9) = 9
x(10) = 5
n = x(1)
For i = 1 To 10
If x(i) < n Then
n = x(i)
j = i
End If
Next i
Print j, n
End Sub
Dim i As Integer, j As Integer, n As Integer
Dim x(1 To 10) As Integer
x(1) = 12
x(2) = 6
x(3) = 7
x(4) = 11
x(5) = 21
x(6) = 22
x(7) = 4
x(8) = 10
x(9) = 9
x(10) = 5
n = x(1)
For i = 1 To 10
If x(i) < n Then
n = x(i)
j = i
End If
Next i
Print j, n
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询