+0  
 
0
69
1
avatar

The side of a right triangle all have integral lengths, and the sum of the lengths of one of the legs and the hypotenuse is 49.  Find all possible lengths for the other leg.

 Dec 9, 2019
 #1
avatar
0

a=1; b=1;c= (49 - a)^2 ; if(c== a^2 + b^2, goto4, goto5);print49-a,a,b; a++;if(a<100, goto2, 0);a=1;b++;if(b<100, goto2, discard=0;

 

Hypotenuse       2nd side       3rd side
25                        24                   7
29                         20                  21
37                         12                  35

 Dec 9, 2019

14 Online Users

avatar
avatar