alright I got some more code written, however I end up with more of a count for Hot Days, Pleasant Days, and/or Cold Days than are actually inputed. Also I still don't know how to list them....this is what I got....
Code:
/*Program to process a collection of daily high temperatures
Written by Janelle Shew
Adapted from various course handouts and book
February 2008
Language written in C (gcc target)*/
#include <stdio.h>
#define sentinel 00
int main(void)
{
int hot = 0,
pleasant = 0,
cold = 0,
sum = 0,
count,
temp;
double average;
sum=0;
count=0;
printf("Enter temperature (00 to quit): ", sentinel);
scanf("%d", &temp);
while (temp != sentinel)
{ if (temp <= 59)
++cold;
if (temp <= 84)
++pleasant;
else
++hot;
sum=sum+temp;
count++;
printf("Enter temperature (00 to quit): ", sentinel);
scanf("%d", &temp);
}
printf("There are %d Hot Days\n", hot);
printf("There are %d Pleasant Days\n", pleasant);
printf("There are %d Cold Days\n", cold);
printf("There are %d temperatures\n", count);
average=(double)sum/(double) count;
printf("\nAverage temperature is %8.2f\n", average);
return (0);
}