Computers and Technology

int readNumbersIntoArray(int numbers[], int size); // Reads up to size numbers or a non-numeric and puts them in the array. // Returns how many numbers read. (2 pts) Write: int minOrMax(int numbers[], int size, bool Max); // Returns the minimum or the maximum value in the array depending on "Max". // If "Max" is true, then it returns the maximum. // If "Max" is false, then it returns the minimum. (2 pts) Write: double trimmedAvg(int numbers[], int size); // Returns the trimmed average of the array. // A trimmed average is a normal average but leaves out the first instance of // the smallest and largest value in the array when doing the calculation. // HINT: use calls to minOrMax() to get the largest and smallest number. (5 pts) Write int main(): // Prompt the user for between 3 and 20 numbers and use readNumbersIntoArray() to // read them into an array. Print an error message and exit if less than three numbers. // Print out the min, max, and trimmedAverage of the array using calls to minOrMax() and // trimmedAvg(). User input is shown in bold below: // Sample run 1: Enter from 3 to 20 numbers followed by a non-numeric: 1 2 q Must be between 3 and 20 numbers! // Sample run 2: Enter from 3 to 20 numbers followed by a non-numeric: -8 2 3 -2 57 q Minimum value in the array: -8 Maximum value in the array: 57 Trimmed average of the array: 1 // Sample run 3: Enter from 3 to 20 numbers followed by a non-numeric: 3, -22, 5, 68, 21, -6, 2 q Minimum value in the array: -22 Maximum value in the array: 68 Trimmed average of the array: 5

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:30, dpinzoner5952
Which of the following commands is more recommended while creating a bot?
Answers: 1
image
Computers and Technology, 22.06.2019 21:30, sunshinekisses
After you clean an engine with hot water spray, it seems to stall; when it doesn't stall, it's idling noisily. technician a says to check for loose bolts on the flex plate near the torque converter. technician b says to wipe down the spark plug wires and the distributor cap. who is correct? a. technician a b. both technicians a and b c. technician b
Answers: 1
image
Computers and Technology, 23.06.2019 06:20, kiarakagni
What is a point-in-time measurement of system performance?
Answers: 3
image
Computers and Technology, 24.06.2019 18:00, aleyshamar14p95561
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best-suited for this?
Answers: 1
Do you know the correct answer?
int readNumbersIntoArray(int numbers[], int size); // Reads up to size numbers or a non-numeric and...

Questions in other subjects:

Konu
Mathematics, 15.07.2019 18:30