刚才那老枣个错或烂了 没看清楚要最小的 我重新改下
Private Sub Form_Click()
Dim a(3) As Integer, b As Integer, c As Integer, d As Integer
a(1) = InputBox("请输入第1个数")
c = a(1)
d = a(1)
For b = 2 To 3
a(b) = Val(InputBox("请输入第" & b & "个数"))
If a(b) > c Then
c = a(b)
End If
If a(b) < d Then
d = a(b)
End If
Next b
Print c; Space(5); d
End Sub
这样可以吗衫含漏
Private Sub Command1_Click()
Dim a(3) As Integer
For i = 1 To 3
a(i) = InputBox("请输入第" & i & 个数, "数据输入")
Next i
maxx = a(1)
For j = 1 To 2
For k = 1 To 3 - j
If a(k) >团大贺 a(k + 1) Then
t = a(k)
a(k) = a(k + 1)
a(k + 1) = t
End If
Next k
Next j
Print "最大数是:"; a(3)
Print "塌派最仿腔小数是:"; a(1)
End Sub
楼上的太袜迅知麻烦了,看我的
Private Sub Command2_Click()
a = InputBox("输入第一个数")
b = InputBox("输入第二告消个数")
c = InputBox("输入第三个数")
IF a if a
print "最小数:";c
End Sub