My first post, been following a set of tutorials online. And it had been writing an averager, were the number of values to be summed was defined in the code. I wanted this to be "user" set. So I attempted to give it a go. I got quite far through it and ran this. It was at that moment i realized I had an inaccuracy because i had absorbed each number as an int type. What i would like to do is to swap it out so that the program can output a decimal. I understand that this will mean i will have to use floats and doubles. But no idea how because most of what I've done has been copied (/tweaked) from examples within the course.

If anyone could help me alter this code so that it will handle decimal places and output decimal results that would be a great help.