Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
function BMI = ReportBMI ( userWeight , userHeight ) % userWeight: user weight in kg % userHeight: user height in centimeters kgToPounds = 2 .
function BMI ReportBMIuserWeight userHeight userWeight: user weight in kg userHeight: user height in centimeters kgToPounds ; kg pounds cmToInches ; cm in Calls function with parameters weight kg and heigth cm BMI CalculateBMIuserWeight 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 height in inches end
function BMI ReportBMIuserWeight userHeight
userWeight: user weight in kg
userHeight: user height in centimeters
kgToPounds ; kg pounds
cmToInches ; cm in
Calls function with parameters weight kg and heigth cm
BMI CalculateBMIuserWeight 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 height in inches
end
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started