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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started