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.CommandButton Command3 
      Caption         =   "方法三"
      Height          =   495
      Left            =   3150
      TabIndex        =   3
      Top             =   2460
      Width           =   1245
   End
   Begin VB.CommandButton Command2 
      Caption         =   "方法二"
      Height          =   495
      Left            =   1710
      TabIndex        =   2
      Top             =   2460
      Width           =   1245
   End
   Begin VB.CommandButton Command1 
      Caption         =   "方法一"
      Height          =   495
      Left            =   300
      TabIndex        =   1
      Top             =   2460
      Width           =   1245
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   2940
      TabIndex        =   0
      Text            =   "90"
      Top             =   900
      Width           =   1365
   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()
    mark = Val(Text1)
    If mark >= 90 Then
        Print "优"
    ElseIf mark >= 80 Then
        Print "良"
    ElseIf mark >= 70 Then
        Print "中"
    ElseIf mark >= 60 Then
        Print "及格"
    Else
        Print "不及格"
    End If
End Sub

Private Sub Command2_Click()
    mark = Val(Text1)
    If mark >= 90 Then
        Print "优"
    ElseIf mark >= 80 And mark < 90 Then
        Print "良"
    ElseIf mark >= 70 And mark < 80 Then
       Print "中"
    ElseIf mark >= 60 And mark < 70 Then
        Print "及格"
    Else
        Print "不及格"
    End If
End Sub

Private Sub Command3_Click()
    mark = Val(Text1)
    If mark >= 60 Then
        Print "及格"
    ElseIf mark >= 70 Then
        Print "中"
    ElseIf mark >= 80 Then
        Print "良"
    ElseIf mark >= 90 Then
        Print "优"
    Else
        Print "不及格"
    End If
End Sub
