I have to return the index number of the lowest value in an array of 12 numbers. I keep getting 12 as the result every time I run it. Here is my code:
minRain =
What is the meaning of this statement?
int lowest = (int) mon4[0];
You are saving the first value of the array as the lowest one and then later comparing with array values. You are actually comparing index with array values.
if (mon4[index]
You should do something like this.