Purchase Solution

Calculating Sequential Access Files in Visual Basic.Net

Not what you're looking for?

Ask Custom Question

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.

Thank you.

Purchase this Solution

Solution Preview

Create an integer variable sum in the subroutine. Now read teh first entry of the file and add it to sum, such as:
sum = sum + (entry from the ...

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.