Find Maximum and Minimum and Summation value from array

Did this problem from subeen vai’s book.

For maximum value:

For minimum value:

Summation:

Average:

Will give here