#include <stdio.h>

void main()
{
float temperatures[24],total=0;
int x;
int time;

for(x=0;x<24;x=x+1)
{
printf("Please enter current temperature:" );
scanf("%f",&temperatures[x]);
}

printf("What time do you want to see?");
scanf("%d",&time);

printf("The temperature at %d was %f",time,temperatures[time]);


//what's the average?
for(x=0;x<24;x=x+1)
{
total = total + temperatures[x];
}
total= total/24;
printf("\n\nThe average was %f\n\n",total);


}