Discuss the below:
Q: How can 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?