結果 : code to find maximum and minimum element in array