hello (edited and clarified) Could you help me improve this code to generate at least 10 "slightly larger" right triangles, but instead of all the results that find an "x"with small random data between 1 and 20 on onetwo of the sides, can be the two legs or the hypotenuse and a leg and the typemissing side with an "x". In addition, add to the resulting figures a typical square that indicates that the triangleit is rectanglea right triangle.
triangle[a_?NumericQ,b_?NumericQ,c_?NumericQ]:=
Block[{x,y,pt,sqr},
sqr=#.#&;
pt[a1_,b1_,c1_]:=
Reduce[sqr[{x,y}]==b1^2&&sqr[{x,y}-{a1,0}]==c1^2&&y>0,{x,y}];
{(Polygon[{{0,0},{a,0},{x,y}}]),
Text[Style[Framed[a,Background-> LightYellow],11],{a/2,0}],
Text[Style[Framed[b,Background-> LightYellow],11],{x/2,y/2}],
Text[Style[Framed[c,Background-> LightYellow],11],
{(a+x)/2,y/2}]}/.ToRules[pt[a,b,c]]]
g[{s1_,s2_,s3_}]:=
Graphics[{EdgeForm[Thick],FaceForm[None],triangle[s1,s2,s3]},
ImagePadding->20,ImageSize->{200,200}]
GraphicsGrid[{
{g[{2, 1, Sqrt[5]}], g[{1, 2, Sqrt[5]}],
g[{Sqrt[5], 1, 2}], g[{Sqrt[5], 2, 1}]},
{g[{2, 2, Sqrt[8]}], g[{Sqrt[8], 2, 2}],
g[{2, Sqrt[8], 2}],
g[{Sqrt[2], Sqrt[2], 2}]}}]
out put