Question: PS:will be focused on functions(call by value and call by reference), arrays of numbers., i am not allowed to use vectors Q: he Body Mass
PS:will be focused on functions(call by value and call by reference), arrays of numbers., i am not allowed to use vectors
Q:
he Body Mass Index (BMI) is a measure for human body shape based on an individual's mass and height. You were employed by a dietician to write a C++ program to compute the BMI of N persons; N is the first input by the user (10 points). For each person the program calls a function to input the weight (in kg) and the height (in m) of a person (use function call by reference - 15 points). Then the program calls a function that calculates and returns the BMI of the person according to the following formula: (15 points)
BMI = weight/ height 2
At the end the program calls a function to output the person BMI and how much his body weight departs from what is normal or desirable for a person of his or her height according to the following: (10 points).
- BMI < 18.5 Underweight
- 18.5 BMI < 25 Normal
- 25 BMI < 30 Overweight
- BMI 30 Obese
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
