Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write a c++ code for my pseudo code. I am take a class that is teaching me flow charts and pseudocode and I would

Please write a c++ code for my pseudo code. I am take a class that is teaching me flow charts and pseudocode and I would like to see the actual code so that I can start preparing myself for next semesters classes.

Here is the pseudo cod:

// Global constant for body mass

Constant Real BODY_MASS_MULTIPLIER = 703

// main module

Module main()

// Local variables

Declare Real Weight, Height, BMI

// Get the weight

Call getWeight(Weight)

// Get the height

Call getHeight(Height)

// Calculate the body mass

Call setMass(Weight, Height, BMI)

// Display body mass

Call showBMI(BMI)

End Module

// The getWeight module gets weight and stores it

// in the inputWeight reference variable.

Module getWeight (Real Ref inputWeight)

Display Enter the weight.

Input inputWeight

End Module

// The getHeight module gets height and stores it

// in the inputHeight reference variable.

Module getHeight (Real Ref inputHeight)

Display Enter the height.

Input inputHeight

End Module

// The setMass module sets the BMI and stores it

// in the BMI reference variable.

Module setMass (Real Weight, Height, Ref BMI)

Set BMI = Weight * (BODY_MASS_MULTIPLIER/(Height* Height))

End Module

// The showBMI module accepts BMI as argument and displays the

// body mass indicator

Module showBMI(BMI)

Display "Body Mass Indicator: ", BMI

End Module

Thanks

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

Students also viewed these Databases questions

Question

Identify the missing reagents af in the following scheme: Br "o2 "

Answered: 1 week ago

Question

b. If n is even, let F = 0.5n, 0.5n + 1,, 0, 1,, 0.5n 1 / n.

Answered: 1 week ago