Вроде привильно работает, сам с функциями особо не знаком, не изучали еще

но вроде так :
Код
uses crt;
const k=3;
e=4;
type
mass=array[1..k,1..e] of integer;
var
i,j,s:integer;
x:mass;
function arrprg(x:mass):boolean;
var bo:boolean;
begin
for i:=1 to k do
begin
bo:=true;
begin
for j:=1 to e-2 do
if (x[i,j]-x[i,j+1])<>(x[i,j+1]-x[i,j+2])
then bo:=false;
if bo=true then inc(s);
end;
end;
end;
Begin
clrscr;
s:=0;
for i:=1 to k do
for j:=1 to e do
begin
write('x[',i,',',j,']= ');
readln(x[i,j]);
end;
arrprg(x);
writeln;
writeln('s=',s);
readln;
end.