1个回答
展开全部
Private Sub Command1_Click()
Dim x As Integer
n1 = 0
n2 = 0
n3 = 0
n4 = 0
i = 1
x = InputBox("请输入第" & i & "名学生的成绩:")
Do While x >= 0
If x >= 90 Then
n1 = n1 + 1
Else
If x >= 70 Then
n2 = n2 + 1
Else
If x >= 60 Then
n3 = n3 + 1
Else
n4 = n4 + 1
End If
End If
End If
i = i + 1
x = InputBox("请输入第" & i & "名学生的成绩:")
Loop
Print "90分以上:"; n1
Print "70 ~ 89:"; n2
Print "60 ~ 69:"; n3
Print "小于60:"; n4
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询