- Home
·
- Math/Dates
·
- Measure if you (Men) are overweight or underweight
Measure if you (Men) are overweight or underweight
Measure if you (Men) are overweight or underweight
Rate Measure if you (Men) are overweight or underweight
(1(1 Vote))
Private Sub Command1_Click()
Dim Height As Single
Dim Weight As Single
Dim Name As String
Name = txtName.Text
Height = CSng(txtHeight.Text) / 100
Weight = CSng(txtweight.Text)
Dim Result As Single
Result = Weight / (Height * Height)
Result = Format(Result, "###.##")
If (Result < 20) Then
MsgBox Name & " , you are underweight "
ElseIf (Result > 20 And Result < 25) Then
MsgBox Name & ", your weight is normal "
ElseIf (Result > 25 And Result < 30) Then
MsgBox Name & " , you are overweight "
ElseIf (Result > 30) Then
MsgBox Name & " , you are much overweight"
End If
End Sub
Measure if you (Men) are overweight or underweight Comments
No comments yet — be the first to post one!
Post a Comment