program maximumum; uses wincrt; const bi=1; bs=20; type tab=array[1..10]of integer; var n:integer; t:tab; t1,t2:tab; n1,n2:integer; procedure saisi_n(var n:integer); begin repeat writeln('donner des nombres'); readln(n); until n>=0 end; procedure remp_tab (var t:tab ; l: byte ) ; const msg=' entrez l element du tbleau n°'; var i: byte ; begin for i := 1 to n do begin write (msg,i,' : ') ; readln (t[i]) ; end; end; procedure eclater(t:tab;n:integer;t1,t2:tab;n1,n2:integer); var j,i:integer; begin j:=1; for i:=1 to n do begin if i<=1 then begin t1[i]:=t[i]; end else t2[i]:=t[i]; j:=j+1; end; end; procedure fusion(t1:tab;n1:integer;t2:tab;n2:integer;var t:tab); var c,i,c1,c2:integer; begin repeat begin c:=c+1; if (t1[c1]n1)or(c2>n2); if(c1>n1)then begin for i:=c2 to n2 do begin c:=c+1; t[c]:=t2[i]; end; end else for i:=c1 to n1 do begin c:=c+1; t[c]:=t1[i]; end; end; procedure aff_tab ( t: tab ; n :byte ) ; var i:integer ; begin for i :=1 to n do begin write (t[i]:6) ; end; writeln; end; begin saisi_n(n); remp_tab(t,n); fusion(t1,n1,t2,n2,t); aff_tab(t,n); end.