Вроде так!! проверьте Ps
Код
program summ;
var
a:array[1..100,1..100] of integer;
N,i,j,sa,sb,sc,s:integer;
begin
repeat
writeln('vvedite N');
readln(N);
if (n<1) then
writeln('nedopustimoe znachenie');
until (n>=1);
for i:=1 to n do
for j:=1 to n do
begin
writeln('vvedite a[',i,',',j,']');
readln(a[i,j]);
end;
begin
sa:=0;
for i:=1 to n do
for j:=1 to (round(N/2)-1) do
sa:=sa+a[i,j];
sb:=0;
for i:=(round(n/2)+1) to n do
for j:=(round(n/2)) to (i-1) do
sb:=sb+a[i,j];
sc:=0;
for i:=1 to round(n/2) do
for j:=round(n/2) to (n-i) do
sc:=sc+a[i,j];
end;
s:=sb+sc+sa;
writeln('sa=',sa);
writeln('sb=',sb);
writeln('sc=',sc);
writeln('s=',s);
end.