Question: i have this code which calculates a persons bmi through entering your height in meters and weight in kg if i enter weight 65.7kg and

i have this code which calculates a persons bmi through entering your height in meters and weight in kg
if i enter weight 65.7kg and height 1.65m i get 24.13322314 etc
just need help making it to 2 decimal places so it reads 24.1
thanks
i have this code which calculates a persons bmi through entering your

iaport java, util, Scanner; pubtic class CalculateBMI \& public static void main(String[] args) f Scanner in = new Scanner(Systen. In); /losk the usen to onter height and welght Systen,out, print ("Enter your weight in Kg: :"); double weight =1n, nextdouble(); System.out.print("Enter your height in meters: "); double height = in, nextbouble(); //coapute the bif double h, = weight / (height * height); I/check bmi range and print the bai and in which range it folls. If (bmi=25.0sisbmi29.9)f System,out, println("Your 8MI 1s, " + bmi + " which means you are in the overweloht range."); J else 1 System.out, println("Your BMI is, " boi + " which koans you are in the obese rango,"); 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!