I think the two dim array is confusing you. To learn how to use arrays and the indexes to arrays, try writing a simpler program. Write a new program that defines a short (3 element) array. Write a loop to find the smallest element in the array and print out its index after the loop that looks through the elements in the array. That should be a short simple program to show you how to remember the index to the smallest element in the array. It will be simpler than working with a two dim array.