why is it that the variable average must be initialized into '0' not '1'? ive checked the program (the second one)
and theres nothing logically wrong..

it will change the value of the average...