View the step-by-step solution to:

# Develop an algorithm for the following problem statement. Your solution should be a pseudocode with appropriate comments.

3.

Develop an algorithm for the following problem statement. Your solution should be a pseudocode with appropriate comments. You should use modularisation in your solution and provide appropriate error messages (15 marks).

Design a program that receives user height in cm and weight in kg and calculates BMI (body mass index). This program should then print the BMI result and a message based on the following table:

table:

BMI Result Message

BMI = > 25.0 Oops, you are overweight.

18.5 <= BMI < 25 Congrats, you are healthy.

BMI < 18.5 Oops, you are underweight.

Body Mass Index formula is BMI = kg/m2 where kg is a person's weight in kilograms and m2 is their height in metres squared.

Weight should be in kilograms (Minimum 1kg, Maximum 160kg), Height should be in centimetre (Minimum 30cm, Maximum 220cm).

Note: for calculating metres squared(m2), centimetre should be converted to metre then powered by 2.

For example:

input: 57 kg 162cm

output: Congrats, you are healthy. Your BMI is 22

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents