i must say, some posts laserlight is cryptic, others he is right to the point, speaking in 2nd grade phrases, and people still sit there and go...."huh????"
lol
right off the bat, i see one big problem, your array is set for 20, then you ask to inputhow many are going in the array, with no error checking to make sure the # of inputs dont excede the array size.
another problem, is that you didnt post your complete code from beginning to end (yes your end is missing), your code is a mess, inconsistant spacing and tabs, and etc
BUT here is your major problem, to find min and max in a full array, that does not sort them first, you CANNOT half it. You either have to sort the entire array into numerical order, then min max at the beginning array[0], and the end array[n]
===OR===
you have to search one by one, through the entire array, array[0] to array[n]
in plain english, your trying to cut the search time in half, by skipping half of what you need to do...it isnt your compilier, it is your programming logic.
someone please correct me if i am wrong, or i missed something in the code snippits.