Trying to find average of values in an array. when I define the values it is working fine but when trying to get values as input my output is wrong. However I'm not getting any error messages. Kindly help.

Trying to find average of values in an array. when I define the values it is working fine but when trying to get values as input my output is wrong. However I'm not getting any error messages. Kindly help.