Question
Function Name: minMax Inputs: 1. (double) An array of doubles Outputs: 1. (double) Minimum value in the array 2. (double) Maximum value in the array
Function Name: minMax
Inputs:
1. (double) An array of doubles
Outputs:
1. (double) Minimum value in the array
2. (double) Maximum value in the array
Banned Functions: min(), max(), sort()
Function Background: You're a serious gamer; a board gamer! To prove how good you are at board games to yourself and to the world, you place all of your scores for many different games into an array, but quickly realize that your board gaming nemesis stole the min() and max() functions from MATLAB! Using your new iteration skills, you write them yourself in order to use them to prove that your maximum score is amazing (and even your minimum score isn't really so bad).
Function Description: Write a function that will find the maximum value and the minimum value of a given array.
Notes: You only need to iterate through the array once.
The array will have at least one element in it.
MATLAB please
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