Finding minimum in Array (2 equal minimums)

hello!

I am writing a program to find the minimum value in an array that is within an int function. There are two elements in the array that have the same value and I need to be able to output them both. However, the way my function code is written as far as I understand is that it will only store the location of the minimum it encounters and it seems to ignore the second one. This makes sense to me as the function can only return one value. I define the location as loc = function(variables) in main. I tried using a for loop before I output the university/local tuition corresponding to that location I just calculated but it seems to only still output the first minimum.

So how can I write this so it returns both? I am only showing the code that is relevant here

But, you could write another function that returns all the values that are less than or equal to the lowest value.

Tim S.

"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson