Question: function BMI = ReportBMI ( userWeight , userHeight ) % userWeight: user weight in kg % userHeight: user height in centimeters kgToPounds = 2 .

function BMI = ReportBMI(userWeight, userHeight)
% userWeight: user weight in kg
% userHeight: user height in centimeters
kgToPounds =2.20462; %1 kg =2.20462 pounds
cmToInches =0.393701; %1 cm =0.393701 in
% Calls function with parameters weight (kg) and heigth (cm)
BMI = CalculateBMI(userWeight, userHeight);
% Define a nested function CalculateBMI
% Function inputs: userWeight (kg), userHeight (cm)
% Function output: bmiValue
% function bmiValue ...
% Use kgToPounds and cmToInches conversion factor
% bmiValue =(weight in lbs *703)/(height in inches^2)
end

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!