Advertisement
LOVEGUN

Tri Matrice (Ligne par Ligne)

Feb 7th, 2021
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.44 KB | None | 0 0
  1. Type
  2.   tab = Array [1..10,1..10] Of Integer;
  3.  
  4. Procedure tri_mat (Var t:tab;l,c:Integer);
  5. Var
  6.   x,i,j,aux: Integer;
  7. Begin
  8.   x := c;
  9.   For i:=1 To l Do
  10.     Begin
  11.       c := x;
  12.       Repeat
  13.         For j:=1 To c-1 Do
  14.           If t[i,j]>t[i,j+1] Then
  15.             Begin
  16.               aux := t[i,j];
  17.               t[i,j] := t[i,j+1];
  18.               t[i,j+1] := aux;
  19.             End;
  20.         c := c-1;
  21.       Until c=0;
  22.     End;
  23. End;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement