在VB中编写一个程序
对某次测验的分数进行统计分析,统计59分及以下,60~69分,70~79分,80~89分,90~99分和100分的同学各有多少人...
对某次测验的分数进行统计分析,统计59分及以下,60~69分,70~79分,80~89分,90~99分和100分的同学各有多少人
展开
1个回答
展开全部
Static i As Integer
Static j As Integer
Static a As Integer
Static b As Integer
Static c As Integer
Static d As Integer
Dim fz As String
fz = InputBox("请输入分数:")
Select Case Val(fz)
Case Is <= 59
i = i + 1
Case 60 To 69
j = j + 1
Case 70 To 79
a = a + 1
Case 80 To 89
b = b + 1
Case 90 To 99
c = c + 1
Case 100
d = d + 1
End Select
‘主要的代码如上
Static j As Integer
Static a As Integer
Static b As Integer
Static c As Integer
Static d As Integer
Dim fz As String
fz = InputBox("请输入分数:")
Select Case Val(fz)
Case Is <= 59
i = i + 1
Case 60 To 69
j = j + 1
Case 70 To 79
a = a + 1
Case 80 To 89
b = b + 1
Case 90 To 99
c = c + 1
Case 100
d = d + 1
End Select
‘主要的代码如上
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询