Private Sub Command1_Click()
Dim n As Integer
Dim sum As Integer
n = InputBox("输入消费金额")
If n > 1000 Then
sum = n * 0.5
ElseIf n > 500 Then
sum = n * 0.7
ElseIf n > 100 Then
sum = n * 0.88
Else
sum = n * 0.95
End If
MsgBox "原价:" & n & vbCrLf & "折扣后:" & sum
End Sub