Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const max = 100;
- var
- a:array [1..max,1..max] of integer;
- i,j,m,n,min,indexMin: integer;
- begin
- randomize;
- readln(n,m);
- for i:= 1 to n do
- begin
- for j:= 1 to m do
- begin
- a[i,j]:=random(100);
- write(a[i,j]:4);
- end;
- writeln;
- end;
- min:=a[1,1];
- for i:= 1 to n do
- begin
- for j:= 1 to m do
- begin
- if a[i,j] < min then
- begin
- min:=a[i,j];
- indexmin:=i;
- end;
- end;
- end;
- for i:= n downto indexMin do
- begin
- for j:= 1 to m do
- begin
- a[i+1,j]:= a[i,j];
- end;
- end;
- writeln;
- writeln;
- for i:= 1 to n+1 do
- begin
- for j:= 1 to m do
- begin
- write(a[i,j]:4);
- end;
- writeln;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement