program tri_tab; uses wincrt; type tab= array [1..25] of integer; var t:tab; n:integer; procedure saisie(var n:integer; var t:tab); var i:integer; begin repeat writeln('donnner le nbre d''element du tableau'); read(n); until n in [5..25]; For i:=1 to n do begin writeln('donner l''element ',i); read(t[i]); end; end; procedure tri(n:integer; var t:tab); var verif:boolean; i,x:integer; begin repeat verif:=true; for i := 1 to n-1 do begin if t[i]>t[i+1] then begin x:=t[i]; t[i]:=t[i+1]; t[i+1]:=x; verif:=false; end; end; until verif=true; end; procedure affiche(n:integer; t:tab); var i:integer; begin write('| '); for i:=1 to n do begin write(t[i],' | '); end; end; BEGIN saisie(n,t); tri(n,t); affiche(n,t); END.