ADD Inputted data by users?

I wanted to know if there was a way to create a repeat set of inputs; lets say to get the prices of items in a shop and when the user finishes to input and press a button, It will sum up the array of numbers. Please I need help. I tried setting up an app variable call item(data type : array of numbers) and store the user input there and I already have a firebase storage space to store the sum of these prices. How then do I collect all of the user’s input, add them and store the sum to be displayed in another page???