Const n=7; Var ma:array[1..n,1..n] of integer; countn,countp,i,j:integer; sr:real; begin for i:=1 to n do for j:=1 to n do begin readln(ma[i][j]); if ma[i][j]>0 then inc(countp) else if ma[i][j]<0 then inc(countn); end; for i:=1 to n do begin for j:=1 to n do write(ma[i][j]:4); writeln; end; writeln('Count of positive=',countp,', count of negative=',countn); for j:=1 to n do begin sr:=0; for i:=1 to n do sr+=ma[i][j]; writeln(j,' ',sr/n); end; end.
begin
writeln('Введите строны первого треугольника: ');
read(a1, b1, c1);
writeln('Введите стороны второго треугольника: ');
read(a2, b2, c2);
p1 := (a1 + b1 + c1) / 2;
p2 := (a2 + b2 + c2) / 2;
s1 := sqrt(p1 * (p1 - a1) * (p1 - b1) * (p1 - c1));
s2 := sqrt(p2 * (p2 - a2) * (p2 - b2) * (p2 - c2));
if (s1 + 1e-3 > s2) and (s1 < s2 + 1e-3) then writeln('Равновеликие')
else writeln('Неравновеликие');
end.
Const
n=7;
Var
ma:array[1..n,1..n] of integer;
countn,countp,i,j:integer;
sr:real;
begin
for i:=1 to n do
for j:=1 to n do
begin
readln(ma[i][j]);
if ma[i][j]>0 then inc(countp) else
if ma[i][j]<0 then inc(countn);
end;
for i:=1 to n do
begin
for j:=1 to n do
write(ma[i][j]:4);
writeln;
end;
writeln('Count of positive=',countp,', count of negative=',countn);
for j:=1 to n do
begin
sr:=0;
for i:=1 to n do
sr+=ma[i][j];
writeln(j,' ',sr/n);
end;
end.