Calculating the average of user inputs in c (intro to programming) : disclaimer: I'm new to programming
I'm working on this problem
 [enter image description here][1]


  [1]: https://i.stack.imgur.com/V5DNU.png

so far ive written this which takes user inputs and calculates an average based on them
https://repl.it/LsAl/0

but i cant figure out how to make the end of the data entry -1 so if possible can someone explain or give me an idea as to how to do it 

Thank you!