Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have written a program that reads numbers from a file that will contain int nu

ID: 3629778 • Letter: I

Question

I have written a program that reads numbers from a file that will contain int numbers and does various things with them but the problem is it reads the first number then stops and i don't know why. any tips would be appreciated. this is the part of the code that im having a problem with i think.

int main(void)
{
int x; int num_count = 0; int sum = 0; int large = INT_MAX; int small = INT_MIN; int end;
double average = 0; bool at1 = false; bool abetween = true; bool
anegative = false;

while ((end = scanf("%d", &x))&& !EOF)
addthem (x,);
num_count++;
large_small (x, &small, &large);

Explanation / Answer

int main(void)
{
int x; int num_count = 0; int sum = 0; int large = INT_MAX; int small = INT_MIN; int end;
double average = 0; bool at1 = false; bool abetween = true; bool
anegative = false;

while (fscanf(file_pointer,"%d",&x)!=EOF)
addthem (x,);
num_count++;
large_small (x, &small, &large);