Private Sub Form_click()
m2 = InputBox("请输入第二门成绩")
m3 = InputBox("请输入第三门成绩")
a = (m1 = 100 And m2 = 100) Or (m1 = 100 And m3 = 100) Or (m2 = 100 And m3 = 100)
b = m1 = 100 Or m2 = 100 Or m3 = 100
x = 95: y = 90: z = 70
If (Val(m1) + Val(m2) + Val(m3)) / 3 >95 And a Then
Print "该生有评选一等见的资格"
ElseIf (Val(m1) + Val(m2) + Val(m3)) / 3 >90 And b Then
Print "该生有评选一等见的资格"
ElseIf 70 <= (Val(m1) + Val(m2) + Val(m3)) / 3 Then
Print "该生有评选一等见的资格"
Else
Print "该生无评选资格"
End If
End Sub
'需要控件:command1Private Sub Command1_Click()
Dim Sum As Long
For i = 0 To 9999
DoEvents
For j = 1 To Len(i)
Select Case UBound(Split(Str(i), Mid(Str(i), j, 1)))
Case 2: Sum = Sum + 10
Case 3: Sum = Sum + 100
Case 4: Sum = Sum + 1000
Case Else
End Select
Me.Caption = Sum
Next j
Next i
' 结果为:170640 此结果,,不考虑,相同的是否不相领 如 3313此号,也为中了100元
Me.Caption = Sum
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)