Write a program that computes the body mass index (bmi) of an individual.Your program should begin by reading a height and weight from the user. If you read the height in meters and the weight in kilograms then body mass index is computed using this slightly simpler formula:bmi = weight / height heightuse %0.2f in the final output value
Answers
Answered by
0
Answer:
Explanation:
#include <stdio.h>
main() {
float h,w;
printf("input your height in meters");
scanf("%f",&h);
printf("input your weight in kg");
scanf("%f",&w);
float bmi=w/(h*h);
printf("calculated BMI is %0.2f",bmi);
return 0;
}
Similar questions