Store integer values in array and print sum of all values,