Quote: "The sides don't have to be a multiple of 3, 4 and 5. What about 5, 12 and 13?"
I should've explained it better. One side (a or b) will be divisible by 3, one side (a or b) will be divisible by 5, and one side (a, b, or c) will be divisible by 5. So your example of 5, 12, and 13 works because:
5 is divisible by 3 and 5.
12 is divisible by 3 and 4.
So you still get the 3, 4, and 5, even though the hypotenuse can be a prime number.
Good performance is better than a good excuse.
CodeSurge -- DBP Editor for serious programmers.