const n=10;
type номер=1..n;
матрица=array [номер,*номер]*of*real;
ном*=*set*of*номер;
const n=10;
type
nomer=1..n;
matr=array[nomer,nomer] of real;
nom=set of nomer;
function Sum(a:matr;s1,s2:nom):real;
var i,j:byte;
sm:real;
begin
sm:=0;
for i:=1 to n do
for j:=1 to n do
if (i in s1)and(j in s2)then
sm:=sm+a[i,j];
Sum:=sm;
end;