Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Command2_Click()
- '2.利用 InputBox 連續輸入數值資料,直到輸入值等於-1時,方才結束輸 入, 最後最後把所有輸入值中最大的數值列出來?
- Cls
- Dim max As Integer
- n = InputBox("請輸入數值")
- max = n
- Do While n <> -1
- n = InputBox("請輸入數值")
- If n > max Then
- max = n
- End If
- Loop
- Print max
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement