/* Sum and overall average of water heights*/
minheight=height[0][0];
maxheight=height[0][0];
for(i=0; i<=nrows-1;i++)
{
for(j=0; j<=ncols-1; j++)
{
totheight=totheight + height[i][j];
/* Print height information, average heights, and months exceeded*/
printf("\n\nReservoir Statistics:");
printf("\nAverage water height above sea level is %7.2f feet.", aveheight);
printf("\nMinimum water height above sea level is %7.2f feet.", minheight);
printf("\nMaximum water height above sea level is %7.2f feet.", maxheight);
printf("\nNumber of months that exceeded the average height above sea level"
" is %2i", nummonth);
fprintf(report,"\n\nReservoir Statistics:");
fprintf(report,"\nAverage water height above sea level is %7.2f feet.",
aveheight);
fprintf(report,"\nMinimum water height above sea level is %7.2f feet.",
minheight);
fprintf(report,"\nMaximum water height above sea level is %7.2f feet.",
maxheight);
fprintf(report,"\nNumber of months that exceeded the average height above"
"sea level is %2i", nummonth);