Program diagonal;
const n=8;
var i,j,c1,c2:integer;
p:array[1..n,1..n] of real;
begin
Randomize;
For i:=1 to n do
begin
For j:=1 to n do
begin
p[i,j]:=Random(20)+Random;
Write(p[i,j]:7:4,' ');
end;
Writeln;
end;
Writeln;
c1:=0;
c2:=0;
For i:=1 to n do
begin
For j:=i+1 to n do
If p[i,j]<1 then<br> c1:=c1+1;
For j:=1 to i-1 do
If p[i,j]<1 then<br> c2:=c2+1;
end;
Writeln('c1 = ',c1);
Writeln('c2 = ',c2);
Writeln('c1 + c2 = ',c1+c2);
Readln;
end.