in reply to Re: reading a text file and accepting input
in thread reading a text file and accepting input

Your code calculates distance correctly, thank you. However, I think since I have a 360x360 matrix my output comes out weird when I transfer the data to a text file. Here's what it looks like:

A B C A 0 4 5 4 3 4 3 B 4 0 4 6 4 4 3 C 5 4 0

Any suggestions on how to correct this?

Replies are listed 'Best First'.
Re^3: reading a text file and accepting input
by Kenosis (Priest) on Apr 28, 2012 at 05:57 UTC

    The code to calculate distance isn't mine; it was in your original code.

    There may be some line wrapping going on in what you're showing. I created a 360x360 matrix and the results displayed fine.