Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions