when you run the program does it output 2000 lines. I am at another computer and I am getting the same output error. The first mean should be 3.7947(its close) instead of 1.87068. I see the program go through the 2000 lines of data and it does this with the code i have written as well but the end results is only 299 lines instead of 2000 lines. I know this because i copy the output data and paste it in word or notepad and view the line count. just wondering if you get the same thing? thanks for looking into this but if you could compile and run it and see if your first answer is 1.87068 then you will see what im talking about