INPUT"请输入一个数"to score DO CASE CASE score>=400 ?S1=(X-400)*0.
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/09/20 13:31:09
INPUT"请输入一个数"to score DO CASE CASE score>=400 ?S1=(X-400)*0.1+67 CASE score>=300 ?S2=(X-300)*
错在哪?
错在哪?
=400 ?S1=(X-400)*0." />
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 Su
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 Su
INPUT"请输入一个数"to score DO CASE CASE score>=400 ?S1=(X-400)*0.
do while .t.clear input '请输入一个数' to x if vartype(x) ="n" wai
float score; if ( int(score)-score!=0 ) ...这样输入提示错误我想判断score
else if(score>=90&&score
int score = 60; if(x>100&&y>500) score=score+1; if(x>=1000||
“score
score
Do you know how to score in the
int x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:
Case
do{ switch case‘a':case'A':case'e':case'E':case'i':case'I':c
判断输入语句 INPUT "X=";X,Y 是否正确.