Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim score As Single
        Dim grade As String
        score = Val(TextBox1.Text)
        Select Case Int(score / 10)
            Case 9, 10
                grade = "优秀"
            Case 8
                grade = "良好"
            Case 7
                grade = "中"
            Case 6
                grade = "及格"
            Case 0 To 5
                grade = "不及格"
            Case Is > 10
                grade = "输入错误"
            Case Else
                grade = "输入错误"
        End Select
        TextBox2.Text = grade
    End Sub
End Class
