Computer Science, asked by arijeetsahoo5, 10 months ago

create an application in Visual Basic to collect the data about the health facts of all your Classmates like height,weight and blood group etc and calculate using BMI formula
(BMI = Weight/Height * Height)​

Answers

Answered by khushi02022010
6

Answer:

\huge{\underline{\underline{\mathbb{\red{Answer:-}}}}}

Public Function functionName (Argument As dataType,..........) As dataType

or

Private Function functionName (Argument As dataType,..........) As dataType

*The keyword Public indicates that the function is applicable to the whole project and the keyword Private indicates that the function is only applicable to a certain module or procedure. An argument is a parameter that can pass a value back to the function. You can include as many arguments as you can.

This BMI calculator is a Visual Basic 2013 program that can calculate the body mass index or BMI of a person based on the body weight in kilogram and the body height in meter. BMI can be calculated using the formula weight/( height )2, where weight is measured in kg and height in meter. If you only know your weight and height in lb and feet, then you need to convert them to the metric system. If your BMI is more than 30, you are considered obese. You can refer to the following range of BMI values for your weight status.

Underweight = <18.5

Normal weight = 18.5-24.9

Overweight = 25-29.9

Obesity = BMI of 30 or greater

\huge{\underline{\underline{\mathbb{\red{The Code:-}}}}}

Public Class Form1

Private Function BMI(Height As Single, weight As Single) As Double

BMI = weight / Height ^ 2

End Function

Private Sub BtnCal_Click(sender As Object, e As EventArgs) Handles BtnCal.Click

Dim h As Single, w As Single

h = Val(TextBox1.Text)

w = Val(TextBox2.Text)

LblBMI.Text = BMI(h, w)

End Sub

End Class

Answered by Anonymous
1

Body Mass Index is a simple calculation using a person's height and weight. The formula is BMI = kg/m2 where kg is a person's weight in kilograms and m2 is their height in metres squared. A BMI of 25.0 or more is overweight, while the healthy range is 18.5 to 24.9.

This BMI calculator is a Visual Basic 2013 program that can calculate the body mass index or BMI of a person based on the body weight in kilogram and the body height in meter. BMI can be calculated using the formula weight/( height )2, where weight is measured in kg and height in meter. If you only know your weight and height in lb and feet, then you need to convert them to the metric system. If your BMI is more than 30, you are considered obese. You can refer to the following range of BMI values for your weight status.

Underweight = <18.5

Normal weight = 18.5-24.9

Overweight = 25-29.9

Obesity = BMI of 30 or greater

The Code

Public Class Form1

Private Function BMI(Height As Single, weight As Single) As Double

BMI = weight / Height ^ 2

End Function

Private Sub BtnCal_Click(sender As Object, e As EventArgs) Handles BtnCal.Click

Dim h As Single, w As Single

h = Val(TextBox1.Text)

w = Val(TextBox2.Text)

LblBMI.Text = BMI(h, w)

End Sub

End Class

Similar questions