![]() It doesn’t measure body fat directly, but instead uses an equation to make an approximation. If (BMI = 18.5 || (BMI) = 25 || BMI <= 29. To find out BMI we will take input from the user (both height and weight) which will be stored in height and weight variables for further calculation. Body mass index (BMI) is an estimate of body fat based on height and weight. Int weightLbs = Integer.parseInt(weightPoundsString) ĭouble heightMeters = 39.3701 * heightIn ĭouble weightKg = 0.45359237 * weightLbs ĭouble BMI = weightKg / (heightMeters * heightMeters) Int heightIn = Integer.parseInt(heightInchesString) ("Enter your height in feet and inches (e.g. Comparing what it looks like to build a body mass index calculator in Java and Python. BMI screens for weight categories that may lead to health problems, but it does not diagnose the body fatness or health of an individual. A high BMI can indicate high body fatness. My teacher put that the Height has to be in that format but I'm not sure if the code I put really works for that. Body Mass Index (BMI) is a person’s weight in kilograms (or pounds) divided by the square of height in meters (or feet). There are a couple of errors I've been getting like in the last name part and in the scanner it skips a question and both weight and height are next to each other. ![]() ![]() ![]() In both cases, you divide your weight by your height raised to the power of 2. I need help figuring out what's not working or what I'm doing wrong. Body Mass Index is calculated using either the metric or imperial BMI formula. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |