Вроде написал, но выдает ошибки.
program Project2;
{$APPTYPE CONSOLE}
uses
SysUtils;
var a: array [0..5,0..5] of real;
n,m,k,i,j:integer;
ca:real;
begin
writeln ('n=, m =');
readln (n,m);
writeln (n,'*',m);
for i:=0 to n-1 do
for j:=0 to m-1 do
read (a[i,j]);
k:=0;
ca:=0;
for j=m-1 do
for i=0 to n-1 do
if a[i,j]:=1 then
begin
ca:=ca+a[i,j];
k:=k+1;
end;
ca:=ca/k;
writeln ('k=',k);
writeln ('ca=',ca);
end;
end.