i have to find the average for this program...
i've tried average = total/i; but it still doesn't work...thanks
#include<stdio.h>
int main()
{
int i, grade[14],total=0, average;
for (i=0; i<14; ++i)
{
printf("enter grade:");
scanf("%d", &grade[i]);
}
printf("\nthe total grade entered is");
for(i=0; i<14; ++i)
{
printf("%d", grade[i]);
total += grade[i];
average = total/i;
}
printf("is %d ", total);
printf("the average grade is %d", average);
return 0;
}