1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| Program Calcul_RSI;
Var a,b,c,d,e,f,G1,G2,G3,G4,G5,P1,P2,P3,P4,P5,SG1,SP2,MG1,MP1,M2,RSI5,x: real;
Begin
writeln('Quel Periode choisir?');
writeln;
writeln;
readln(x);
if x=5
then writeln('Ecrire les valeurs de clotures un par un (appuyez sur --entrer-- pour confirmer chaque valeur un a un');
readln(a);
readln(b);
readln(c);
readln(d);
readln(e);
readln(f);
if (b-a)> 0
then begin (b-a)=G1 , P1=0 end; ////////////////// C'est a partir , et surtout ICI que sa bloque.... Que sa soit avec ou sans les 'begin, end' sa marche pas...////////////////////
if (b-a)<0
then G1=0 , (b-a):=P1;
if (c-b)>0
then (c-b):= G2 , P2=0;
if (c-b)<0
then G2=0 , (c-b):=P2;
if (d-c)>0
then (d-c):= G3, P3=0;
if (d-c)<0
then G3=0 , (d-c):=P3;
if (e-d)>0
then (e-d):= G4, P4=0;
if (e-d)<0
then (e-d):=P4, G4=0;
if (f-e)>0
then (f-e):= G5, P5=0;
if (f-e)<0
then G5=0, (f-e):=P5;
G1+G2+G3+G4+G5 = SG1;
P1+P2+P3+P4+P5 = SP2;
SG1/5 = MG1;
SP2/5 = MP1;
MG1/MP1 = M2;
100 - 100/(1 + M2) = RSI5;
writeln;
writeln;
writeln('Le RSI 5 est de :');
writeln(RSI5);
readln;
end. |
Partager