VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text4 
      Height          =   495
      Left            =   480
      TabIndex        =   4
      Top             =   960
      Width           =   1935
   End
   Begin VB.TextBox Text3 
      Height          =   495
      Left            =   3240
      TabIndex        =   3
      Top             =   240
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   495
      Left            =   1800
      TabIndex        =   2
      Top             =   240
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   480
      TabIndex        =   1
      Top             =   240
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   1920
      TabIndex        =   0
      Top             =   2280
      Width           =   1455
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
 Dim b1 As Boolean, b2 As Boolean, b3 As Boolean, b4 As Boolean
Dim m1%, m2%, m3%
m1 = Text1:   m2 = Text2:   m3 = Text3
' 多个情况分别存放在各自的逻辑变量中, 条理清楚
b1 = (m1 + m2 + m3) / 3 >= 95
b2 = (m1 = 100 And m2 = 100 And m3 >= 80)
b3 = (m3 = 100 And m2 = 100 And m1 >= 80)
b4 = (m1 = 100 And m3 = 100 And m2 >= 80)
If b1 Or b2 Or b3 Or b4 Then
  Text4 = "一等奖"
Else
  Text4 = "无一等奖"
End If
End Sub
