Private Sub Command1_Click()
Dim t As Single
Dim w As Single, h As Single
h = InputBox("请输入身高:")
t = w / h ^ 2
Select Case t
Case Is <= 18
MsgBox "低体重"
Case Is <= 25
MsgBox "体重正常"
Case Is <= 27
MsgBox "超重体重"
Case Else
MsgBox "肥胖"
End Select
End Sub
clearinput "请输入身高cm" to sg
input "请输入体重kg" to tz
do case
case sg<150
?"特殊体型"
case tz=sg-150
?"标准"
case tz>sg-150
?"过胖"
case tz<sg-150
?"过瘦"
endcase
return
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)