I want to calculate the sum and average on file.
for (i = 0; i > 50; i++) {
fscanf(fp, "%d\n", &a);
sum = a + sum;
//printf("%d\n",a);
count++;
}
but there is 50
as you can see that means I know how many integers that the file in it, I want to make a loop without that information. My loop should detect how many numbers in that file have.
As you can see I'm working on files.