I am trying to show the average temperature for 4 days, the highest and lowest. The code works perfectly to show the average and highest/lowest value of the 4 days. The problem is trying to show in which day it occurred. 

I know that I don't need to use arrays for it, I thought it was easy if I used it. So, here's the code. How can I improve it, to get the day of the highest/lowest value insert by the user?

```
int high[NUMS], low[NUMS];

int maximum = 40;
int minimum = -40;

int i, day;

float total, average;

printf("---=== IPC Temperature Analyzer ===---\n");

for (i = 0; i < NUMS; ++i) {

    do{
        printf("Enter the high value for day %d: \n", i+1);
        scanf("%d", &high[i]);
        printf("Enter the low value for day %d: \n", i+1);
        scanf("%d", &low[i]);  

       if ((high[i] > maximum) || (low[i] < minimum) || (high[i] < low[i])){
                printf ("Incorrect values, temperatures must be in the range -40 to 40, high must be greater than low.\n");
        }

    } while((high[i] > maximum) || (low[i] < minimum) || (high[i] < low[i]));

    if((high[0] < high[i]))
       high[0] = high[i];

    if ((low[0] > low[i])) 
       low[0] = low[i];

    total = total + (high[i] + low[i]);

}

 average = (total / (NUMS * 2));

printf("The average (mean) temperature was: %.2f\n", average);
printf("The highest temperature was %d, on day %d\n", high[0], day);
printf("The lowest temperature was %d, on day %d\n", low[0], day);

return 0;

```