Private Sub Command1_Click()
a = InputBox("请输入分数:")
If IsNumeric(a) And a <= 100 And a >= 0 Then
Select Case a
Case 0 To 59
dd = "E"
Case 60 To 69
dd = "D"
Case 70 To 79
dd = "C"
Case 80 To 89
dd = "B"宽纯
Case 90 To 100
dd = "A"慎燃咐
Case Else
dd = "成绩错误!"
End Select
MsgBox dd
Else
MsgBox "你输入的成绩非法"
End If
End Sub
Private Sub Command1_Click()Dim a(50) As String, b(50) As Integer
n = CInt(InputBox("燃答班级人数="))
For i = 1 To n
a(i) = InputBox("No." &i &"姓名:")
b(i) = InputBox("No." &i &"备伍成皮滚慧绩:")
Next i
For i = 1 To n - 1
For j = 1 To n - 1 - i
If b(j) <b(j + 1) Then
a(0) = a(j): a(j) = a(j + 1): a(j + 1) = a(0)
b(0) = b(j): b(j) = b(j + 1): b(j + 1) = b(0)
End If
Next j
Next i
For i = 1 To n
Print a(i), b(i)
Next i
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)