BMI Formula:
| From: | To: |
Body Mass Index (BMI) is a simple calculation using a person's height and weight. The formula is BMI = kg/m² where kg is a person's weight in kilograms and m² is their height in meters squared. BMI screens for weight categories that may lead to health problems.
The calculator uses the standard BMI formula:
Where:
Explanation: The formula divides the weight by the square of the height to give a standardized measure of body weight relative to height.
Standard BMI Categories:
Tips: Enter weight in kilograms and height in meters. For accuracy, measure height without shoes and weight with minimal clothing.
Simple C Program to Calculate BMI:
#include <stdio.h>
int main() {
float weight, height, bmi;
printf("Enter your weight in kg: ");
scanf("%f", &weight);
printf("Enter your height in meters: ");
scanf("%f", &height);
bmi = weight / (height * height);
printf("Your BMI is: %.1f\n", bmi);
if (bmi < 18.5) {
printf("Category: Underweight\n");
} else if (bmi < 25) {
printf("Category: Normal weight\n");
} else if (bmi < 30) {
printf("Category: Overweight\n");
} else {
printf("Category: Obesity\n");
}
return 0;
}
How to Compile and Run: