uses crt; var a: array[1..25,1..20] of integer; i,j,min,k,n,m: integer; procedure input_array(n,m: integer; var a: array[1..25,1..20] of integer); var i,j: integer; begin randomize; for i: =1 to n do begin for j: =1 to m do begin a[i,j]: =random(101)-50; write(a[i,j]: 4); end; writeln; end; end; procedure del(n,m,min,k: integer; a: array[1..25,1..20] of integer); var i,j: integer; begin for i: =1 to n do begin if i=k then i: =i+1; for j: =1 to m do write(a[i,j]: 4); writeln; end; end;
beginread(n,m); input_array(n,m,a); min: =a[1,1]; for i: =2 to n do for j: =1 to m do if a[i,j]< min then begin min: =a[i,j]; k: =i; end; writeln; writeln; del(n,m,min,k,a); end.
пардоньте, прослоупочил про подпрограммы)
uses crt; var a: array[1..25,1..20] of integer; i,j,min,k,n,m: integer; procedure input_array(n,m: integer; var a: array[1..25,1..20] of integer); var i,j: integer; begin randomize; for i: =1 to n do begin for j: =1 to m do begin a[i,j]: =random(101)-50; write(a[i,j]: 4); end; writeln; end; end; procedure del(n,m,min,k: integer; a: array[1..25,1..20] of integer); var i,j: integer; begin for i: =1 to n do begin if i=k then i: =i+1; for j: =1 to m do write(a[i,j]: 4); writeln; end; end;
beginread(n,m); input_array(n,m,a); min: =a[1,1]; for i: =2 to n do for j: =1 to m do if a[i,j]< min then begin min: =a[i,j]; k: =i; end; writeln; writeln; del(n,m,min,k,a); end.