Campbell Ritchie

Marshal

Posts: 58366

178

posted 6 months ago

Where does 703 come from? I have never heard of other units than kg and m for BMI, so maybe 703 is a unit conversion factor.

posted 6 months ago

Start by writing down the formula for BMI as a function of height and weight. It will look like "BMI = ... (something) ...", where "something" is a function of weight and height. Next, solve that equation for the weight value. Your solution will look like "weight = ... (something) ...", where "something" is a function of BMI and height. You learned how to do basic algebra like that already, right?

Finally take your solution and implement it in Java.

kennith stomps wrote:I cannot think of what the formula should be

Start by writing down the formula for BMI as a function of height and weight. It will look like "BMI = ... (something) ...", where "something" is a function of weight and height. Next, solve that equation for the weight value. Your solution will look like "weight = ... (something) ...", where "something" is a function of BMI and height. You learned how to do basic algebra like that already, right?

Finally take your solution and implement it in Java.