You want help with errors yet you don't use code tags and you don't tell us what the errors are. All I get when I compile are warnings that suggest inaccurate behavior. These statements:
avg[i]=n+m+p/3;
davg = sum/3;
Should be changed to this:
avg[i]=n+m+p/3.0f;
davg = sum/3.0f;
This forces the expression into the float range so that anything past the radix is not truncated as it would be using integer math.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401