Question
Please answer and explain a. Draw the hierarchy chart and then plan the logic for a program that calculates a persons body mass index (BMI).
Please answer and explain
a. Draw the hierarchy chart and then plan the logic for a program that calculates a persons body mass index (BMI). BMI is a statistical measure that compares a persons weight and height. The program uses three modules. The first prompts a user for and accepts the users height in inches. The second module accepts the users weight in pounds and converts the users height to meters and weight to kilograms. Then, it calculates BMI as weight in kilograms divided by height in meters squared, and displays the results. There are 2.54 centimeters in an inch, 100 centimeters in a meter, 453.59 grams in a pound, and 1,000 grams in a kilogram. Use named constants whenever you think they are appropriate. The last module displays the message End of job.
b. Revise the BMI-determining program to execute continuously until the user enters 0 for the height in inches.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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