Largest and smallest value of an array
843785Jul 29 2008 — edited Jul 30 2008I'm trying to figure out how to calculate the largest and smallest value within an array.
Not just any array; an array with values and length deteremined by user.
What's the best way for determining these values?
Input .. User determines array length.
Input .. User determines the value of each index.
Output .. largest and smallest values inside that array no matter what length or values the user determines.
Please help;
Provide me with a detailed solution;
and if possible some example code of how this might work.
Thanks!