Created a function to determine the total sum of sales. The data is inserted in the main.c