Hi,
I need help finding the number of outputs a function has. This function finds pythagorean triples given a maxumum value of the hypotenuse. Addditionally, it negates all outputs that are not positive integers. The output of the code looks like:
Input the maximum length of a triangle: 10
Triangle:
Side A = 3
Side B = 4
Hypotenuse = 5
x = 3 %x is the value of Side A
Triangle:
Side A = 6
Side B = 8
Hypotenuse = 10
x = 6
I need to find how many x values the function has produced which should be 2 for this. I could also solve my problem by numbering the triangle by n+1 so the first triangle would be 1, the second 2, and so forth.
Thanks
Best Answer