VB 程序书写题计算BMI 值 输出指数和结论

Dim a As Single, b As Single, c As Single

VB 程序书写题计算BMI 值 输出指数和结论

文章插图
a = Val(Text1)
VB 程序书写题计算BMI 值 输出指数和结论

文章插图
b = Val(Text2)
c = Round(a / (b * 1.6))
Label6.Caption = c
If Option1.Value Then
If c < 20 Then
Label8.Caption = \"过轻\"
ElseIf c < 25 Then
Label8.Caption = \"适中\"
ElseIf c < 30 Then
Label8.Caption = \"过重\"
ElseIf c < 35 Then
Label8.Caption = \"肥胖\"
ElseIf c >= 35 Then
Label8.Caption = \"非常肥胖\"
End If
Else
If c < 19 Then
Label8.Caption = \"过轻\"
ElseIf c < 24 Then
Label8.Caption = \"适中\"
【VB 程序书写题计算BMI 值 输出指数和结论】ElseIf c < 29 Then
Label8.Caption = \"过重\"
ElseIf c < 34 Then
Label8.Caption = \"肥胖\"
ElseIf c >= 34 Then
Label8.Caption = \"非常肥胖\"
End If
End If
End Sub


    特别声明:本站内容均来自网友提供或互联网,仅供参考,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。