I have been tasked with creating a program that displays an average number for each month, based on a text file with a list of numbers. The list of numbers has 365 lines, one value for each day of the year. I have to read the data from this file to create the averages for each month, and I am completely stumped. Any help would be greatly appreciated!
365 days implies it is not a leap year.
Therefore the first 31 values are for January, the next 28 are for February, and so on. You might read the values for each month individually, in a loop, so that after all 12 months have been processed the entire 365 lines have been completed.