The errors on lines 102 and 115 are due to the fact that you have a comma of 10,000 , but it must be 10000 , the comma cannot be used as a numeric separator. In fact, you are using a comma operator that evaluates its expressions from left to right and returns only the last one. So in this case:
int test = 10,000; ^ ^ | Expression 2 Expression 1
since = has a higher priority, this happens first, and on your part there is a syntax error, on the other hand:
int test = (10,000);
would cause the value 10 be discarded and the octal literal 000 assigned to test .
The last error on line 128 is that count is local to main , but you are trying to use it in average , you need to pass count as the second parameter.
source share