The Body Mass Index (BMI) a convenient rule of thumb used to broadly categorize a person as underweight, normal weight,

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

The Body Mass Index (BMI) a convenient rule of thumb used to broadly categorize a person as underweight, normal weight,

Post by answerhappygod »

The Body Mass Index (BMI) a convenient rule of
thumb used to broadly categorize a person
as underweight, normal
weight, overweight,
or obese based on tissue mass (muscle, fat, and
bone) and height. It can be obtained with the following
formula:
BMI = weight / (height*height)
with the BMI in kg/m2 ,
the height in m and the mass
in kg.
Commonly accepted BMI ranges are:
Complete the following C program, which is
You can consider that the user will always
enter float values for the height and
weight values.
See the examples for the expected format of the
output.
Hint: The
function atof() declared in stdlib.h will
be useful.
For example:
code
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
if (argc != 3) {
printf("Usage: %s height weight\n",
argv[0]);

}
else {

// type your code here

}
return 0;

}
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply