+0  
 
0
423
1
avatar

A right triangle with integer leg lengths is called "cool'' if the number of square units in its area is equal to twice the number of units in the sum of the lengths of its legs. What is the sum of all the different possible areas of cool right triangles?

 

 

can some one tell me how to do this question, thankssssssssss.

 Sep 27, 2020
 #1
avatar
0

x=0;p=0; y=0;z=0;n=x^2;if(n==y^2 + z^2 and y+z>x and y*z/2==2*(x+y+z), goto loop, goto next);loop:p=p+1;printp," =",x,y,z;next:x++;if(x<200, goto4,0);x=0;y++;if(y<200, goto4, 0);x=0;y=0;z++;if(z<200, goto4,0)

 

OUTPUT:

1  = 41 40 9
2  = 26 24 10
3  = 20 16 12

 

 

Total areas =[40 * 9 / 2] + [24 * 10/2] + [16 * 12/2] =180 + 120 + 96 = 396 units^2.

 Sep 27, 2020

2 Online Users

avatar