In my application I've created a sequential access file or often call a text file in Visual Basic.Net. I am wondering how can I code the program to calculate the average of all the data from the sequential access file?
Example: Let say my money program ask me to enter the amount (one at a time) of all the things I bought today and the amount I enter would store in the sequential file. The money program has a average button that will calculate the average of all amount I spent. How can code the average button to read all the amount I enter in the sequential file and give me the average? Program examples would be helpful.