Write a program to calculate calories burned based on age, weight, heart rate, and...
Check the final answer first, then review the worked steps.
Check the final answer first, then review the worked steps.
Scanner scnr = new Scanner(System.in);
double age = scnr.nextDouble();
double weight = scnr.nextDouble();
double heartRate = scnr.nextDouble();
double time = scnr.nextDouble();
double calories = ((age 0.2017) + (weight 0.09036) + (heartRate 0.6309) - 55.0969) time / 4.184;
System.out.printf("Calories: %.2f calories\n", calories);
System.out.printf("Calories: %.2f calories\n", calories); to format the output to two decimal places.