Sorry heres the program :
Code:
#include <stdio.h>
int main (void)
{
int temp;
double average;
int hot_days, pleasant_days, cold_days;
char x;
double total;
double avg;
hot_days = 0;
pleasant_days = 0;
cold_days = 0;
printf("Enter the temperatures and Enter -99 when finished>");
do
{
scanf("%d", &temp);
if (temp == -99)
break;
if(temp >= 85)
hot_days++;
printf("Enter the temperatures and Enter -99 when finished>");
if(60 < temp && temp <= 84)
pleasant_days++;
if(temp <= 60)
cold_days++;
} while (temp != -99);
total += temp +99;
avg = total/(hot_days + pleasant_days + cold_days) ;
printf("%d Hot days, %d Pleasant Days and %d Cold Days\n",
hot_days, pleasant_days, cold_days);
printf("The average is> %.2f\n",avg);
system ("pause");
return (0);
}