Calcul de pourcentage --------------------------------- C % M Majoration P valeur_partielle T valeur_totale W Minoration ================================= Define pourcentage()= Prgm :Local t,c,p,w,m,n,x :0→c:0→x:0→m:0→p:0→t:0→w :setMode(5,2) :Disp " Calcul de Pourcentage (%) " :Disp " Prix ToT et Pourcentage.......: 1" :Disp " Prix ToT et Prix payé...........: 2" :Disp " Prix ToT et Différence..........: 3" :Disp " Différence et Prix payé.............: 4" :Disp " Différence et Pourcentage.........: 5" :Disp " Prix payé et Pourcentage........: 6" :Disp " Zéro pour Quitter" :getKey(1) :Request "Votre choix",x :If x<1 or x>6 : Stop :Disp "" :Disp "Calcul de Pourcentage (%)" :Disp "--------------------------" :©-----------------------------1 :If x=1 Then : Request "Prix total.............: ",t : Request "Pourcentage........: %",c :((t)/(100))*c→p : t-p→w : t+p→m : Disp "Différence...........: ",p : Disp "Minoration...........:",w : Disp "Majoration...........:",m : Goto fin :EndIf :©-----------------------------2 :If x=2 Then : Request "Prix Total............: ",t : Request "Prix Payé............: ",w : t-w→p :abs(p)→p :((p*100)/(t))→c : Disp "Différence...........: ",p : Disp "Pourcentage........: %",c : Goto fin :EndIf :©-----------------------------3 :If x=3 Then : Request "Prix Total..............:",t : Request "Différence.............:",p :((100)/(t))*p→c : t-p→w : t+p→m : Disp "Pourcentage..........: %",c : Disp "Minoration...........:",w : Disp "Majoration...........:",m : Goto fin :EndIf :©-----------------------------4 :If x=4 Then : Request "Différence.............: ",p : Request "Prix Payé...............:",w : w+p→t :((100*p)/(t))→c : Disp "Prix Total..............: ",t : Disp "Pourcentage..........: %",c : Goto fin :EndIf :©-----------------------------5 :If x=5 Then : Request "Pourcentage..........: %",c : Request "Différence.............:",p :((p*100)/(c))→t : t-p→w : t+p→m : Disp "Prix Total..............: ",t : Disp "Prix minoré...........: ",w : Disp "Prix majoré...........: ",m : Goto fin :EndIf :©-----------------------------6 : If x=6 Then : Request "Pourcentage..........: %",c : Request "Prix Payé...............:",w :((c)/(100-c))*w→p : round(p,2)→p : w+p→t : Disp "Différence.............: ",p : Disp "Prix Total..............: ",t : Goto fin :EndIf :©-----------------------------aff :Lbl fin :Disp " Entrer pour sortir !" :getKey(1) :EndPrgm