-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbmi.vb
More file actions
21 lines (20 loc) · 648 Bytes
/
Copy pathbmi.vb
File metadata and controls
21 lines (20 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Public Class bmi
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim w, h, bmi As Double
w = TextBox1.Text
h = TextBox2.Text
bmi = w / (h * h)
TextBox3.Text = bmi
If (bmi < 15.0) Then
MsgBox("Severly Underweight")
ElseIf (bmi >= 15.0 And bmi <= 18.0) Then
MsgBox("Underweight")
ElseIf (bmi >= 19.0 And bmi <= 25.0) Then
MsgBox("Normal")
ElseIf (bmi >= 25.0 And bmi <= 30.0) Then
MsgBox("Overweight")
Else
MsgBox("Severe Obesity")
End If
End Sub
End Class