This is a part of code, you will need to apply for each month calculation.
CODE
//intializing highest and lowest temp only once
int highesttemp = 0;
int lowesttemp = 999;
int jan;
while (a <= 30) {
jan=(int)Math.floor(25+Math.random()*(38-25+1));
year[a]=jan;
monthSum1=monthSum1+jan;
if (jan>75)
{
above75++;
if(jan > highesttemp)
highesttemp = jan;
}
else if (jan<33)
{
below33++;
if(jan < lowesttemp)
lowesttemp = jan;
}
a++;
}
I'd suggest you use methods to do your calculations as you can see the code for all the months is repeating.
This is what I received at the output:
CODE
Avg for Jan is 31
Avg for Feb is 33
Avg for Mar is 41
Avg for Apr is 49
Avg for May is 60
Avg for Jun is 67
Avg for Jul is 75
Avg for Aug is 67
Avg for Sep is 58
Avg for Oct is 47
Avg for Nov is 36
Avg for Dec is 54
The hottest day of the year was 83
The coldest day of the year was 25
Total number of days below 33 degrees Fahrenheit: 28
Total number of days above 75 degrees Fahrenheit: 18
Hope that helps :)