0

A quantity known as the body mass index (BMI) is used to calculate the risk of weight-related health problems. BMI is computed by the formula

BMI = w/(h/100)^2

Where w is weight in kilograms and h is height in centimeters. A BMI of about 20 to 25 is considered “normal.” Write an application that accepts weight and height (both integers) and outputs the BMI. Use standard Java input/output (System.in with Scanner class and System.out).

The user’s weight and height must be read in and stored as integers. Calculate the BMI (a floating-point number) and display the result. In the calculation, the height is divided by 100 to convert from centimeters to meters. You must define a constant to represent this conversion value (100.0).

Please help me.

Edited by jcooler: n/a

4
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by chiiqui
0

Please check the Member Rules for DaniWeb

"Do provide evidence of having done some work yourself if posting questions from school or work assignments"

0

I made this type of program once, this is easy, but providing/ exerting effort will do help you a lot . please exert some more effort in posting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.