When i compile the following code, i getalso the average is always zero. I know its late, but what logic am i missing.data definition has no type or storage class
Code:#include <stdio.h> int count; float grade, total =0; average=0; int main() { for(count = 1; count <=5; count++) { printf("Enter grade number %d: ", count); scanf("%f", &grade); total = total + grade; average = total / count; printf("Your average is %f :\n", average); } system("pause"); return 0; }