to display the maximum element of the array