用VB怎么做学生成绩等级排序的程序?

用VB怎么做学生成绩等级排序的程序?,第1张

VB中添加棚神逗一瞎运个按钮点击就可以了\x0d\x0aPrivate Sub Command1_Click()\x0d\x0aa = InputBox("请输入分数:")\x0d\x0aIf IsNumeric(a) And a = 0 Then\x0d\x0aSelect Case a\x0d\x0aCase 0 To 59\x0d\x0add = "E"\x0d\x0aCase 60 To 69\x0d\x0a dd = "D"\x0d\x0aCase 70 To 79\x0d\x0a dd = "C"\x0d\x0aCase 80 To 89\x0d\x0a dd = "B"\x0d\x0aCase 90 To 100\x0d\x0a dd = "A"\x0d\x0aCase Else\x0d\x0add = "成绩错误!"\x0d\x0aEnd Select\x0d\x0aMsgBox dd\x0d\x0aElse\x0d\x0aMsgBox "你输入的成绩非法链卖"\x0d\x0aEnd If\x0d\x0aEnd Sub

Private Sub Command1_Click()

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

    n = InputBox("请输入一个颂镇猛成绩")

    If n >= 60 Then

        Print "及格旅御"

    Else

        Print "不及格"

    End If

End Sub


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12261309.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-24
下一篇 2023-05-24

发表评论

登录后才能评论

评论列表(0条)

保存