add array in main and call the sum function