1. Other
  2. Other
  3. construct a solution algorithm for the following problems your question...

Question: construct a solution algorithm for the following problems your question...

Question details

Construct a solution algorithm for the following problems. Your question solution should contain:

  • Defining problem

  • Pseudo code algorithm

  • Desk check of the algorithm

(Three test cases for each question. Two valid and one error test case if appropriate)

 

Question 1

A clinic requires a program to calculate the body mass index (BMI) and display the BMI value and status of a patient. Develop a program to accept the height and weight of a patient, calculate the BMI and display BMI value and status of a patient.

page1image2848072688

BMI = weight in kg/height2 

        BMI         Status
Below 24 (inclusive) Under weight 
Above 24 to 29 (inclusive) Healthy 
Above 29 to 34 (inclusive) Overweight 
Above 34 Obese


page1image2847976448

Error check required: negative height and weight.


Assume user always enter number.


If the user enter invalid height or weight, print error message and ends the program.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution