Compteur J Volt V Ampérage I Puissance W Résistance R Cheval vap C 735,49875 D Dans tous les pays, sa définition est la même 1 ch = 75 kgf·m/s = 735,49875 W. ================================= Define Électricité()= Prgm :Local v,i,w,r,c,d,j :735.49875→d :0→v:0→i:0→w:0→r:0→c :setMode(5,2) :For j,1,3 : Disp "" :EndFor :0→j :Disp " un Cheval Vapeur 735,49875 watts " :Disp "" :Disp " entrer pour commencer " :Disp "" ©---------------------- :getKey(1) :Request "Voltage si non zéro ",v :If v>0:j+1→j ©---------------------- :Request "Ampère si non zéro ",i :If i>0:j+1→j :If j>1:Goto calc ©---------------------- :Request "Watts si non zéro ",w :If w>0: j+1→j :If j>1:Goto calc ©---------------------- :Request "Résistance si non zéro ",r :If r>0:j+1→j :If j>1:Goto calc ©---------------------- :Request "Chevaux si non zéro ",c :If c>0:j+1→j :If j>1 Then : Goto calc :Else : For j,1,6 : Disp "" : EndFor : Disp "Désolé, pas assez d'argument pour ce calcul" : Disp "" : Goto fin :EndIf ©---------------------- :Lbl calc ©---------------------- :If v≠0 and i≠0 Then : v*i→w :((v)/(i))→r :((w)/(d))→c : Goto aff :EndIf ©---------------------- :If v≠0 and w≠0 Then :((w)/(v))→i :((v)/(i))→r :((w)/(d))→c : Goto aff :EndIf ©---------------------- :If v≠0 and v≠0 Then :((v)/(r))→i :v*i→w :((w)/(d))→c :Goto aff :EndIf ©---------------------- :If v≠0 and c≠0 Then :c*d→w :((w)/(v))→i :((v)/(i))→r :Goto aff :EndIf ©---------------------- :If i≠0 and w≠0 Then :((w)/(i))→v :((v)/(i))→r :((w)/(d))→c :Goto aff :EndIf ©---------------------- :If i≠0 and r≠0 Then :i*r→v :v*i→w :((w)/(d))→c :Goto aff :EndIf ©---------------------- :If i≠0 and c≠0 Then : c*d→w :((w)/(i))→v :((v)/(i))→r : Goto aff :EndIf ©---------------------- :If w≠0 and r≠0 Then : w*r→i :√(i)→v :((w)/(d))→c : Goto aff :EndIf ©---------------------- :If c≠0 and r≠0 Then : c*d→w : w*r→v :√(v)→v :((w)/(r))→i :√(i)→i : Goto aff :EndIf ©---------------------- :Lbl aff ©---------------------- :round(v,3)→v :round(i,3)→i :round(w,3)→w :round(r,3)→r :round(c,3)→c :Disp "" :If v>1 Then : Disp v,"Volts" :Else : Disp v,"Volt" :EndIf :If i>1 Then : Disp i,"Ampères" :Else : Disp i,"Ampère" :EndIf :If w>1 Then : Disp w,"Watts" :Else : Disp w,"Watt" :EndIf :If r>1 Then : Disp r,"Ohms" :Else : Disp r,"Ohm" :EndIf :If c>1 Then : Disp c,"Chevaux Vapeurs" :Else : Disp c,"Cheval Vapeur" :EndIf :Disp "" :Disp "" ©---------------------- :Lbl fin ©---------------------- :Disp " Entrer pour sortir !" :getKey(1) :EndPrgm