I need to make a code that opens a file that contains random numbers and then calculate and display the number of numbers, the sum, and average. I have it so that it will open the file and check for errors and close it. I am also able to get it to display the numbers with a loop I'm just lost on getting the three things figured out.

Never Mind. All is good I figured out what I needed. =)

I need to make a code that opens a file that contains random numbers and then calculate and display the number of numbers, the sum, and average. I have it so that it will open the file and check for errors and close it. I am also able to get it to display the numbers with a loop I'm just lost on getting the three things figured out.

I am having the same problem. Not getting it to work. How did you do it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.