I see two small errors.

1) In C, array indices start at 0. That means your loop should go from 0 to 6 and that your average value should be computed by summing a[0] to a[6].

2) The double equal "==" is a comparison operator. Use a single equal "=" to actually store the values for "big" and "small" in the loop.

Also, I don't understand why you subtract 1 to your average value.

1) In C, array indices start at 0. That means your loop should go from 0 to 6 and that your average value should be computed by summing a[0] to a[6].

2) The double equal "==" is a comparison operator. Use a single equal "=" to actually store the values for "big" and "small" in the loop.

Also, I don't understand why you subtract 1 to your average value.

Last edited on

Topic archived. No new replies allowed.