The BMI Calculator is a user-friendly Java program crafted to swiftly compute Body Mass Index (BMI), body fat percentage, and provide pertinent BMI and body fat categories based on user-provided data for height, weight, age, and gender.
Usage
- Compile the BMICalculator.java file.
- Run the compiled Java program.
- Input the requested information when prompted:
- Height (in inches)
- Weight (in kilograms)
- Age (in years)
- Gender (male or female)
Calculations & Categories
- BMI Calculation: weight / (height^2), where height is in meters and weight is in kilograms.
- Body Fat Percentage Calculation:
-
For adults (18 years and above):
- Male: (1.20 * BMI) + (0.23 * Age) - 16.2
- Female: (1.20 * BMI) + (0.23 * Age) - 5.4
-
For adolescents (below 18 years old):
- Male: (1.51 * BMI) - (0.70 * Age) - 2.2
- Female: (1.51 * BMI) - (0.70 * Age) + 1.4
Example Input & Output
-
Input:
- Height (in inches): 72
- Weight (in kilograms): 80
- Age (in years): 30
- Gender: Male
-
Output:
- BMI: 23.92
- BMI Category: Normal Weight
- Body Fat %: 19.4%
- Body Fat Category: Average
Resources
- GitHub Repo Link: BMI-and-Body-fat-percentage-Calculator
- Trial Website Link: Trial
This BMI and body fat percentage calculator has garnered 2 stars, 43 clones, and 52 views, making it a popular tool for health-conscious individuals seeking quick and reliable body metrics assessment. Give it a try and stay informed about your body composition! While many have cloned my projects, only a few have shown interest by granting them a star. Plagiarism is bad, and even if you are copying it, just consider giving it a star.
Top comments (0)