I checked the program and it was correct when I wrote it. I know on the printf line it is missing the t after the h int. I am curious though to find out where the errors are. I keep getting a segmentation error.
I'm not sure how you're getting a segmentation error. I also don't see the need for a loop, if you're only computing one distance. I removed both of the for statements from your code, and the calculation works fine.
And again, your formatted printf statement needs some attention.
Finally, may I ask why you're using a float to hold the product of two integers? And, I'd recommend that you declare Distance up at the top of the routine, instead of in the middle of your code.