var a:array[1..10,1..10]of integer; i,j,min,i1,j1:integer; begin min:=9999999; for i:=1 to 10 do for j:=1 to 10 do readln(a[i,j]); for i:=1 to 10 do for j:=1 to 10 do if a[i,j]<min then begin min:=a[i,j]; i1:=i; j1:=j; end; a[i1,j1]:=a[i1,j1]+100; end.
Program Pr1; uses crt; var mas:array[1..20,1..20] of integer; i,j,k,l,min:integer; Begin clrscr; min:=10000000; for i:=1 to 20 do for j:=1 to 20 do mas[i,j]:=random(100); for i:=1 to 20 do for j:=1 to 20 do begin gotoxy(j,i); writeln(mas[i,j]); if mas[i,j]<min then begin min:=mas[i,j]; k:=i; l:=j; end; end; mas[k,l]:=mas[k,l]+100; for i:=1 to 20 do for j:=1 to 20 do begin gotoxy(j+50,i); writeln(mas[i,j]); end; end.
Answers & Comments
var a:array[1..10,1..10]of integer;
i,j,min,i1,j1:integer;
begin
min:=9999999;
for i:=1 to 10 do for j:=1 to 10 do readln(a[i,j]);
for i:=1 to 10 do for j:=1 to 10 do if a[i,j]<min then begin min:=a[i,j]; i1:=i; j1:=j; end;
a[i1,j1]:=a[i1,j1]+100;
end.
Program Pr1;
uses crt;
var mas:array[1..20,1..20] of integer;
i,j,k,l,min:integer;
Begin
clrscr;
min:=10000000;
for i:=1 to 20 do
for j:=1 to 20 do mas[i,j]:=random(100);
for i:=1 to 20 do
for j:=1 to 20 do begin
gotoxy(j,i);
writeln(mas[i,j]);
if mas[i,j]<min then begin
min:=mas[i,j];
k:=i;
l:=j;
end;
end;
mas[k,l]:=mas[k,l]+100;
for i:=1 to 20 do
for j:=1 to 20 do begin
gotoxy(j+50,i);
writeln(mas[i,j]);
end;
end.