INPUT"请输入一个数"to score DO CASE CASE score>=400 ?S1=(X-400)*0.1+67 CASE score>=300 ?S2=(X-300)*错在哪?

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 21:36:42
INPUT=400 ?S1=(X-400)*0.1+67 CASE score>=300 ?S2=(X-300)*错在哪?" />

INPUT"请输入一个数"to score DO CASE CASE score>=400 ?S1=(X-400)*0.1+67 CASE score>=300 ?S2=(X-300)*错在哪?
INPUT"请输入一个数"to score DO CASE CASE score>=400 ?S1=(X-400)*0.1+67 CASE score>=300 ?S2=(X-300)*
错在哪?

INPUT"请输入一个数"to score DO CASE CASE score>=400 ?S1=(X-400)*0.1+67 CASE score>=300 ?S2=(X-300)*错在哪?
Private Sub Command1_Click()
Dim str1 As String,str2 As String,score
str1 = "成绩输入":str2 = "请输入一个百分制的成绩"
Form1.Cls
lab1:
score = InputBox(str2,str1)
If IsNumeric(score) Then
score = Val(score)
If score >= 0 And score <= 100 Then
Select Case Int(score / 10)
Case 0 To 5:grade = "E"
Case 6:grade = "D"
Case 7:grade = "C"
Case 8:grade = "B"
Case 9:grade = "A"
End Select
Else
MsgBox "输入的成绩不和法,请重新输入(0~100)!",vbInformation,"错误提示"
End If
Else
MsgBox "输入的不是合法的数值!请重新输入!",vbInformation,"错误提示"
GoTo lab1
End If
Form1.ForeColor = RGB(231,15,153)
Form1.FontSize = 18
Form1.Print "你输入的成绩" & grade & "等"
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Command1.Caption = "输入成绩"
Command2.Caption = "程序结束"
End Sub