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
|
Function Recurcif(ListeA : ArrOfInt;Ind,Lim,nb,so : Integer;var om,mu : integer)
var
nu,xi : integer;
begin
if ind = 1 Then
begin
FOR ListeA[ind]:= 0 TO Lim DO // 1
IF Test(ind, So, Lim) THEN
Recurcif(ListeA,Ind+1,Lim,so,om,mu)
end
else
if ind = Nb Then
begin
FOR ListeA[ind]:= ListeA[ind-1] TO Lim DO // NB
begin
// resultat
Xi:= Mult(ListeF, ListeA);
Nu:= Mu + Xi;
Mu:= Nu;
Nu:= Om + 1;
Om:= Nu
end;
end
else
FOR ListeA[ind]:= ListeA[ind-1] TO Lim DO // 2 a NB-1
IF Test(ind, So, Lim) THEN
Recurcif(ListeA,Ind+1,Lim,so,om,mu)
end; |
Partager