Dim a As Single
a = Val(Text1.Text)
If a >100 Or a <0 Then '此处需另启一行
Text2.Text = "error"
ElseIf a >= 90 And a <= 100 Then
Text2.Text = "优秀"
ElseIf a <90 And a >= 80 Then
Text2.Text = "良好"
ElseIf a <80 And a >= 70 Then
Text2.Text = "中等"
ElseIf a <70 And a >= 60 Then
Text2.Text = "及格"
ElseIf a <60 And a >= 0 Then
Text2.Text = "不及格"
End If
End Sub
Private Sub Command1_Click()Dim n As Integer
If n >= 60 Then
Print "及格"
Else
Print "不及格"
End If
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)