0

Hello All:

I searched through the old posts, but could not find an answer as how to read numbers from a sequential text file & calculate the average of the numbers. Do you place the calculation to find the averages outside of the loop to read the text file? If so, how do you transfer the number total outside of the loop? If it is inside the loop, how do you add all the numbers (in this case 25 numbers) together before averaging?

Hope my question makes sense! Thanks!

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by WaltP
0

Hello All:

Hello you...

I searched through the old posts, but could not find an answer as how to read numbers from a sequential text file & calculate the average of the numbers.

Then you would have seen you need to post code pointing out your immediate problem. And use CODE Tags.

Do you place the calculation to find the averages outside of the loop to read the text file? If so, how do you transfer the number total outside of the loop?

How many times do you normally calculate the actual average of 25 numbers? That's the calculation itself.

If it is inside the loop, how do you add all the numbers (in this case 25 numbers) together before averaging?

The last part of this question seems to answer the previous question, does it not?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.