BMI指数
Dim a As Single, b As Single, bmi As Single
a = InputBox("输入身高")
b = InputBox("输入体重")
bmi = b / a ^ 2
If bmi < 18.5 Then
Print bmi; "体重不足"
Else
If bmi < 23 Then
Print bmi; "健康"
Else
If bmi < 25 Then
Print bmi; "超重"
Else
If bmi < 30 Then
Print bmi; "肥胖"
Else
Print bmi; "严重肥胖"
End If
End If
End If
End If
End Sub
Dim a As Single, b As Single, bmi As Single
a = InputBox("输入身高")
b = InputBox("输入体重")
bmi = b / a ^ 2
If bmi < 18.5 Then
Print bmi; "体重不足"
Else
If bmi < 23 Then
Print bmi; "健康"
Else
If bmi < 25 Then
Print bmi; "超重"
Else
If bmi < 30 Then
Print bmi; "肥胖"
Else
Print bmi; "严重肥胖"
End If
End If
End If
End If
End Sub