Private Sub Command1_Click()
Dim x, k
x = InputBox("请输入一个数据<0~~100%>:")
If x < 0 Or x > 1 Then
k = MsgBox("请输入有效数据!", vbExclamation)
ElseIf x >= 0.1 Then
Print "及格!"
Else
Print "不及格!"
End If
End Sub
干啤24
纯生24
建议买一本书
private function strResult(ByVal X as string) as string
dim intX as integer
intX = X.substring(0,X.length - 1)
if intX>0 and intX<100 then
if intX < 10 then
return "不及格"
else
return "及格"
end if
end if
end function