<span> в 105 году н. э. Цай Лунем </span>
Var
<span>
R1, R2, R3, S1, S2, S3: Integer;</span><span>
begin</span><span>
writeln('Введите размеры
рации и чемодана');</span><span>
readln(R1, R2, R3, S1, S2, S3);</span><span>
if ((R1 < S1) and (R2 < S2)
and (R3 < S3)) or</span><span>
((R3 < S3) and (R2 < S1) and
(R1 < S2)) or</span><span>
((R1 < S1) and (R2 < S3) and
(R3 < S3)) or</span><span>
((R2 < S2) and (R1 < S3) and
(R3 < S1)) or</span><span>
((R2 < S1) and (R3 < S2) and
(R1 < S3)) or</span><span>
((R1 < S2) and (R3 < S1) and
(R2 < S3)) then</span>
<span>WriteLn('ПОМЕЩАЕТСЯ')</span><span>
else</span>
<span>WriteLn('НЕ ПОМЕЩАЕТСЯ');</span>
<span>end.</span>
Program asd;
USES crt;
Const n=100;
Var A:array[1..n] of integer;
i,kp,ko:integer;
BEGIN
Writeln('Массив: ');
For i:=1 to n do
begin
A[i]:=-20+Random(40);
Write(A[i]:4);
end;
Writeln;
kp:=0;
ko:=0;
For i:=1 to n do
begin
If A[i]>0 then kp:=kp+1;
If A[i]<0 then ko:=ko+1;
end;
Writeln('Кол-во положительных элементов: ' ,kp);
Writeln('Кол-во отрицательных элементов: ' ,ko);
END.
Var ma:array[1..4,1..5] of integer;
ar:array[1..20] of integer;
k,i,j:integer;
begin;
randomize;
writeln('Matrix:');
for i:=1 to 4 do
begin;
writeln;
for j:=1 to 5 do
begin;
ma[i,j]:=random(-10,10);
if ma[i,j]<0 then
begin;
inc(k);
ar[k]:=ma[i,j];
end;
write(ma[i,j]:4);
end;
end;
writeln;
writeln('Final array:');
for i:=1 to k do
write(ar[i]:4);
<span>end.</span>