The program first asks the user for the number of elements to be stored in the array, then asks for the numbers. This is my code
static void Main
for (int i = 0; i < vector.GetLength(0); i++) { if (i == 0) { VectorMinMax[1]= vector[i]; VectorMinMax[0]= vector[i]; } else { if (VectorMinMax[1] > vector[i]) VectorMinMax[1] = vector[i]; if (VectorMinMax[0] < vector[i]) VectorMinMax[0] = vector[i]; } }