program recursion;

uses crt;

const MAX = 100;
	  
function fibo_rec(n:integer):longint;
begin
   ...
end;

function fibo_iter(n:integer):longint;
var tab	: array[0..MAX] of longint;
   i	: integer;
begin	
   ...
end;

function mini(a,b,c:longint):longint;
var min_tmp : longint;
begin	    
   if a<b then min_tmp:=a else min_tmp:=b;
   if c<min_tmp then mini:=c else mini:=min_tmp;
end;

function suivant(x:longint):longint;
begin
   ...
end;

procedure Hamming_rec(n:integer);
var i : integer;
var x : longint;
begin 
   ...
end;

const MAXI = 1000;
	   
procedure Hamming_iter(n:integer);
var a,b,c,i	      : integer;
var en_cours,va,vb,vc : longint;
   stock	      : array[0..MAXI] of longint;
begin
   stock[0]:=1;
   a:=0;b:=0;c:=0;
   write('1 '); {premier terme}
   for i:=2 to n do
   begin
      ...
   end
end;


var nb : integer;
       
begin
   clrscr;
   write('n?');
   readln(nb);
   write('fibo(',nb,') = ',fibo_iter(nb));
   readln;
   write('n?');
   readln(nb);
   write('Hamming ->',nb,' : ');Hamming_rec(nb);
   readln;
   writeln;
   write('Hamming ->',nb,' : ');Hamming_iter(nb);
   readln;
end.