Question: 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 code:

// main module

Module main()

// Local variables

Declare Integer budget, count = 0, minimum, maximum

// Get numbers

Call getNumber(count, minimum, maximum)

// display values

Call showMaxMin(count, minimum, maximum)

End Module

// The getNumber mount module gets a series of numbers

// and updates minimum and maximum amounts for each entry

Module getNumber(Integer Ref count, Ref minimum, Ref maximum)

Declare Integer inputAmount

Do

Display Enter an amount:

Input inputAmount

If count == 0 then

Set minimum = inputAmount

Set maximum = inputAmount

End If

Set count = count + 1

If inputAmount < minimum

Set minimum = inputAmount

End If

If inputAmount > maximum

Set maximum = inputAmount

End If

Until inputAmount == -99

End Module

// The showMaxMin module displays count, minimum, and maximum numbers entered

Module showMaxMin(Integer count, minimum, maximum)

Display "For ,count, numbers entered

Display "Minimum is", minimum

Display "Maximum is", maximum

End Module

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!