[Solved] Error at end of rainfall program [closed]
[ad_1] A possible culprit is your loop condition in displayOutput(). Here’s the line: for (int i = 0; rainArray[i] <= NUM_MONTHS; i++) It’s presumably supposed to loop through every element in rainArray. However, currently it will loop through an arbitrary number of times depending on your input data. It’s entirely possible that it’s going past … Read more