Private Sub Command1_Click() Dim a(1 To 10) Dim b, c b = Val(InputBox("")) a(1) = b For i = 2 To 10 c = Val(InputBox("")) a(i) = c If b > c Then b = c
Next MsgBox "最小:" & b End Sub
第2个回答 2014-01-16
解: private sub command1_click() dim a(1 to 10) as double dim min as double for i=1 to 10 a(i)=val(inputbox("请输入数组元素值:")) next i for i=1 to 10 if a(i)<min then min=a(i) next i msgbox "最小的数字为:" & min end sub本回答被提问者采纳