利用输入窗口输入10个数,求这10个数的最大值 vb怎么编
利用输入窗口输入10个数,求这10个数的最大值 vb怎么编啊
程序代码:
Private Sub Command2_Click() Dim i As Long Dim max As Double Dim j As String, o As Double For i = 1 To 10 Do j = InputBox("请输入第" & i & "个数字:") Loop While Not IsNumeric(j) o = CDbl(j) If o > max Then max = o End If Next i MsgBox "最大值为:" & max End Sub