简单的VB编程题问题(在线等)

2024-11-14 14:29:24
推荐回答(2个)
回答1:

Private Sub Command1_Click()
Select Case text1.Text
Case Is < 60
label1.Caption = "不及格"
Case Is <= 75
label1.Caption = "及格"
Case Is <= 85
label1.Caption = "良好"
Case Is <= 100
label1.Caption = "优秀"
Case Else
label1.Caption = "输入成绩错误"
End Select
End Sub

回答2:

Private Sub Command1_Click()
Dim i As Integer
i = Me.Text1.Text
Select Case i
Case Is < 60
Me.Label1.Caption = "不及格"
Case Is <= 75
Me.Label1.Caption = "及格"
Case Is <= 85
Me.Label1.Caption = "良好"
Case Is <= 100
Me.Label1.Caption = "优秀"
End Select
End Sub