Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program MinimumLigneMat;
- Uses Wincrt;
- Type
- tab = Array [1..20,1..20] Of Integer;
- Var
- t: tab;
- l,c: Integer;
- Procedure remplir (Var t:tab;Var l,c:Integer);
- Var
- i,j: Integer;
- Begin
- Writeln ('Saisir la ligne: ');
- Readln (l);
- Writeln ('Saisir le nombre de colonne');
- Readln (c);
- Randomize;
- For i:=1 To l Do
- For j:=1 To c Do
- t[i,j] := Random(10);
- For i:=1 To l Do
- Begin
- Writeln ;
- For j:=1 To c Do
- Write (t[i,j],' | ');
- End;
- End;
- Function min (t:tab;i,c:Integer): Integer;
- Var
- j,x: Integer;
- Begin
- x := t[i,1];
- For j:=1 To c Do
- If t[i,j]<x Then x := t[i,j];
- min := x;
- End;
- Procedure affiche (t:tab;l:Integer);
- Var i: Integer;
- t1: Array [1..20] Of Integer;
- Begin
- For i:=1 To l Do
- t1[i] := min(t,i,c);
- Writeln;
- For i:=1 To l Do
- Writeln ('Min ligne ',i,' : ',t1[i]);
- End;
- Begin
- remplir (t,l,c);
- affiche (t,l);
- End.
Advertisement
Add Comment
Please, Sign In to add comment