Calcul des termes Un et Vn (suites croisées) :
program suites; function V(n:byte):word;forward ; begin
uses wincrt;
var
n:byte;
function U(n:byte):word;
begin
if n=0 then U:=1
else U:= 3+ U(n-1)+2 * V(n-1);
end;
function V(n:byte):word;
begin
if n=0 then V:=2
else V:= 2* U(n-1)+ 3 * V(n-1);
end;
writeln('Donner n : ');
readln(n);
writeln('U ',n,' = ', U(n));
writeln('V ',n,' = ', V(n));
end.