I really don't know how to do this since I have been sick from class and really don't know to many people in the class. So I came to this forums for some help. If you guys could help me get started, that would be great.

I think I would need to store everything in a double array and use a for-loop to calculate the average and output it to the user. But not 100% sure.

All my work is at school and all I'll have is Monday to work on it. I have read everything in but I don't know how to store it into a double array. If I can get that step done I'm positive I can get everything else done.

And just run a for-loop through each line to print out the city name and the average of the temperature?

Yes, loop of each line of the file.

Then tokanize each line by the space. Since each line has well define format with the space it's easy. Then keep first two elements separately, city as Toronto, Canada. Then rest of the stuff all you need to add into the double array, that is from the third element of the tokens you've.

Then tokanize each line by the space. Since each line has well define format with the space it's easy. Then keep first two elements separately, city as Toronto, Canada. Then rest of the stuff all you need to add into the double array, that is from the third element of the tokens you've.[/COLOR]

It'll take a little more logical tweaking as some of the Cities and countries may contain two words separated by a space such as United States and New York. One way to do this is to split the String/line as already mentioned with space and then check each token to see if it's a number and if it is, start adding your numbers and counting the number of numeric items on the line so you can calculate an average. If you hit the end of the line and no number has been found, then output an N/A for that line.

Of course. I just give him a methodology. Should design properly. That could solve how the number are identified. If OP just hang with the index then it's real mess. But validating the format then it's not a problem at all, that's how try-catch use in tricky way.