Var R1, R2, R3, S1, S2, S3: Integer; begin writeln('Введите размеры рации и чемодана'); readln(R1, R2, R3, S1, S2, S3); if ((R1 < S1) and (R2 < S2) and (R3 < S3)) or ((R3 < S3) and (R2 < S1) and (R1 < S2)) or ((R1 < S1) and (R2 < S3) and (R3 < S3)) or ((R2 < S2) and (R1 < S3) and (R3 < S1)) or ((R2 < S1) and (R3 < S2) and (R1 < S3)) or ((R1 < S2) and (R3 < S1) and (R2 < S3)) then WriteLn('ПОМЕЩАЕТСЯ') else WriteLn('НЕ ПОМЕЩАЕТСЯ'); end.
var a:array[1..3, 1..4] of integer; i,j,min:integer; begin for i:=1 to 3 do for j:=1 to 4 do begin read(a[i,j]); if a[i,j]<0 then min:=a[i,j]; end; for i:=1 to 3 do for j:=1 to 4 do if (a[i,j]<0) and (a[i,j]<min) then min:=a[i,j]; writeln('Минимальное отрицательное число ',min); end.
Задача №2 var a:array[1..2, 1..5] of integer; i,j:integer; begin for i:=1 to 2 do for j:=1 to 5 do read(a[i,j]); for i:=1 to 2 do begin for j:=1 to 5 do write(a[i,j],' '); writeln; end; end.
Задача №3 var a:array[1..3, 1..4] of integer; i,j:integer; begin for i:=1 to 3 do for j:=1 to 4 do read(a[i,j]); for i:=1 to 3 do for j:=1 to 4 do if a[i,j]=10 then writeln('Номер столбца — ',j,' Номер строки — ',i); end.
R1, R2, R3, S1, S2, S3: Integer;
begin
writeln('Введите размеры рации и чемодана');
readln(R1, R2, R3, S1, S2, S3);
if ((R1 < S1) and (R2 < S2) and (R3 < S3)) or
((R3 < S3) and (R2 < S1) and (R1 < S2)) or
((R1 < S1) and (R2 < S3) and (R3 < S3)) or
((R2 < S2) and (R1 < S3) and (R3 < S1)) or
((R2 < S1) and (R3 < S2) and (R1 < S3)) or
((R1 < S2) and (R3 < S1) and (R2 < S3)) then
WriteLn('ПОМЕЩАЕТСЯ')
else
WriteLn('НЕ ПОМЕЩАЕТСЯ');
end.
var a:array[1..3, 1..4] of integer;
i,j,min:integer;
begin
for i:=1 to 3 do
for j:=1 to 4 do begin
read(a[i,j]);
if a[i,j]<0 then min:=a[i,j];
end;
for i:=1 to 3 do
for j:=1 to 4 do
if (a[i,j]<0) and (a[i,j]<min) then min:=a[i,j];
writeln('Минимальное отрицательное число ',min);
end.
Задача №2
var a:array[1..2, 1..5] of integer;
i,j:integer;
begin
for i:=1 to 2 do
for j:=1 to 5 do read(a[i,j]);
for i:=1 to 2 do begin
for j:=1 to 5 do
write(a[i,j],' ');
writeln;
end;
end.
Задача №3
var a:array[1..3, 1..4] of integer;
i,j:integer;
begin
for i:=1 to 3 do
for j:=1 to 4 do read(a[i,j]);
for i:=1 to 3 do
for j:=1 to 4 do
if a[i,j]=10 then writeln('Номер столбца — ',j,' Номер строки — ',i);
end.