kennith stomps

Ranch Hand

Posts: 160

Campbell Ritchie

Marshal

Posts: 56525

172

Campbell Ritchie

Marshal

Posts: 56525

172

posted 1 month 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 1 month 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.