Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with Flowgorithm, not flowchart. The Flowgorithm will be based on my pseudocode, thanks. Algorithm: Ask the user to enter the person weight

I need help with Flowgorithm, not flowchart. The Flowgorithm will be based on my pseudocode, thanks.

Algorithm:

Ask the user to enter the person weight and height

Calculate the body mass index (BMi) of that person

If body mass index is greater than or equal to 18.5 And less than or equal to 25 then

Display a message saying the person has optimal weight for their height.

Otherwise, If body mass index if less than 18.5, then display a message saying the person has underweight for their height.

Other, If body mass index if greater than 25, then display a message saying the person has overweight for their height.

Pseudocode

// Declare the variables

Declare Real weight

Declare Real height

Declare Real bodyMassIndex

//Read the weight and height of a person

Display Enter the weight of a person in pounds.

Input Weight

Display Enter the height of a person in inches.

Input height

// Calculate the body mass index (BMI)

Set bodyMassIndex = Weight * 703 / (height * height)

// Checks the body mass index of a person

If bodyMassindex >= 18.5 And bodyMassIndex <=25 Then

Display A person has optimal weight for their

height.

Else If bodyMassIndex < 18.5 Then

Display A person has underweight for their

height.

Else If bodyMassIndex > 25 Then

Display A sperson has overweight for their

height.

End if

Problem

Write a program that calculates and displays a persons body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for his or her height. A persons BMI is calculated with the following formula:

BMI = weight x 703 / height2

where weight is measured in pounds and heightis measured in inches. The program should ask the user to enterhis/her weight and height. The program should display a message indicating whether the person has optimal weight, is underweight, or is overweight. A sedentary persons weight is considered optimal if his or her BMI is between18.5 and 25. If the BMI is less than 18.5, the person is considered underweight. If the BMI valueis greater than 25, the person is considered overweight

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions

Question

1. Identify three approaches to culture.

Answered: 1 week ago

Question

3. Identify and describe nine cultural value orientations.

Answered: 1 week ago

Question

4. Describe how cultural values influence communication.

Answered: 1 week ago