Your code already finds and prints the average value: that's what the
function is there for.
It's a trivial matter to change it to a similar function that takes a second parameter:
double avg_rainfall(double rainfalls, int year)
and remove the outer loop. You wrote that code, it's not exactly complicated to take stuff out! :D
And modifying that code to produce similar "max" and "min" functions is simple too - just store a "current max) value (set it to the first element) and compare it to all the others. If the new element is bigger, set teh "current max" to the new element, and keep checking. At the end of the loop, you have the largest.
Very similar code for the minimum.
If you wrote that code, it shouldn't take you more than five minutes to write and text the new methods.
If you didn't, throw it all away and start again: that's pretty poor quality code even for a student exercise so whoever you copy'n'pasted it from doesn't know what he's doing any better than you do at this point!