In line 6 it appears that int variable-sized object may not be initialized, what is the problem with the int? How can i fix it?
#include <stdio.h>
int main (void)
{
const int SIZE=5;
//variable remain constant
int grades[SIZE]= {66,50,93,67,100};
double sum= 0.0;
int i;
printf("\nMy grades are:\n");
for (i=0;i<SIZE;i++)//0 first character and < because last character is sentinel
printf("%d\t",grades[i]);
printf("\n\n");
for (i=0;i<SIZE;i++) //analyze data in list and retrieve it
sum=sum+grades[i];
printf("My average is %.2f\n\n",sum/SIZE); //sum /size for average with decimals
return 0;
}
I expected to find an average using simple one-dimensional array, but that problem doesn't let me run the program