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 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

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_2

Step: 3

blur-text-image_3

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

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

Why is personal selling important to an IMC strategy? AppendixLO1

Answered: 1 week ago