Min = number[0]; Max = number[0]; for (i = 1; i < n; i++) { if (number[i] < Min) Min = a[i]; if (number[i] > Max) Max = number[i]; }