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)
        If score > 100 Or score < 0 Then
            grade = "输入不正确，请重新输入"
        ElseIf score >= 90 Then
            grade = "优秀"
        ElseIf score >= 80 Then
            grade = "良好"
        ElseIf score >= 70 Then
            grade = "中"
        ElseIf score >= 60 Then
            grade = "及格"
        Else
            grade = "不及格"
        End If
        TextBox2.Text = grade
    End Sub
End Class
