Define triangle_rect()=
Prgm
:Local b,ab,c,ac,h,per,sur,pn,cn,vol,dmv
:0→b:0→ab:0→c:0→ac:0→h:0→vol:0→dmv
:0→per:0→sur:0→pn:0→cn:0→i:0→j
:setMode(2,2)
:setMode(5,2)
:For j,1,7
:  Disp ""
:EndFor
:getKey(1)
:Request "Base  si non zéro ",b
:If b≠0
:  i+1→i
:Request "Angle B si non zéro ",ab
:If ab≠0
:  i+1→i
:If i>1
:  Goto x
:Request "Côté  si non zéro ",c
:If c≠0
:  i+1→i
:If i>1
:  Goto x
:Request "Angle C si non zéro ",ac
:If ac≠0
:  i+1→i
:If i>1
:  Goto x
:Request "Hypot si non zéro ",h
:If h≠0
:  i+1→i
:If i>1
:  Goto x
:Request "%Pente si non zéro ",pn
:If pn≠0
:  i+1→i
:If i>1
:  Goto x
:Request "%Cônicité si non zéro ",cn
:If cn≠0
:  i+1→i
:If i>1
:  Goto x
:Text "Désolé, pas assez d'argument"
:Stop
:Lbl x
:If pn≠0
:tan(((pn)/(100)))→ac
:If cn≠0
:tan(((pn)/(200)))→ac
:If ab≠0 and ac≠0 or ac≠0 or ab≠0 and pn≠0 or cn≠0 Then
:  Text "Ces arguments ne permettent pas le calcul"
:  Stop
:EndIf
:If b≠0 and ac≠0 Then
:((b)/(cos(ac)))→h
:  b*tan(ac)→c
:  Goto y
:EndIf
:If c≠0 and ab≠0 Then
:((c)/(cos(ab)))→h
:  c*tan(ab)→b
:  Goto y
:EndIf
:If h≠0 and ac≠0 Then
:  h*cos(ac)→b
:  h*sin(ac)→c
:  Goto y
:EndIf
:If h≠0 and ab≠0 Then
:  h*sin(ab)→b
:  h*cos(ab)→c
:  Goto y
:EndIf
:If c≠0 and ac≠0 Then
:((c)/(sin(ac)))→h
:((c)/(tan(ac)))→b
:  Goto y
:EndIf
:If b≠0 and ab≠0 Then
:((b)/(sin(ab)))→h
:((b)/(tan(ab)))→c
:  Goto y
:EndIf
:If b≠0 and c≠0 Then
:  tan(((c)/(b)))→ac
:((b)/(cos(ac)))→h
:  Goto y
:EndIf
:If b≠0 and h≠0 Then
:  sin(((b)/(h)))→ab
:((b)/(tan(ab)))→c
:  Goto y
:EndIf
:If c≠0 and h≠0 Then
:  sin(((c)/(h)))→ac
:((c)/(tan(ac)))→b
:  Goto y
:EndIf
:Lbl y
:If ab=0
:  90-ac→ab
:If ac=0
:  90-ab→ac
:If pn=0
:  tan(ac)*100→pn
:If cn=0
:  tan(ac)*200→cn
:h+b+c→per
:b*c→sur
:((π*b^(2)*h)/(3))→vol
:((vol)/(2))→dmv
:round(b,2)→b
:round(ab,2)→ab
:round(c,2)→c
:round(ac,2)→ac
:round(h,2)→h
:round(per,2)→per
:round(sur,2)→sur
:round(dmv)→dmv
:round(pn,2)→pn
:round(cn,2)→cn
:Disp "Base",b
:Disp "Angle Base",ab
:Disp "Côté",c
:Disp "Angle Côté",ac
:Disp "Hypoténuse",h
:Disp "Périmètre",per
:Disp "Surface",sur
:Disp "Demi Volume",dmv
:Disp "Pente en %",pn
:Disp "Conicité en %",cn
:getKey(1)
:EndPrgm