0
> #include <stdio.h>

int main() {
   double temp[7];
   int i;

   for (i = 0; i <=7; i++) {
      printf("Enter the day %d temp:\n",i);
      scanf(" %.1lf\n",&temp[i]);
   }

   

   return 0;
}

How could I write a loop that prompts the user to enter a temperature value and store that value in the array?

0 Answers0