Var r:array[1..3,1..3] of integer;i,j,n,k,sum:integer; b:array[1..30]of integer;beginrandomize;writeln('Исходная матрица: ');for i:=1 to 3 dobeginfor j:=1 to 3 dobeginr[i,j]:=random(15)-5;write(r[i,j]:3);end;writeln;end;// cумма диагоналиwriteln;for i:=1 to 3 dobeginfor j:=1 to 3 dobeginif i=j then beginwrite(r[i,j]:3);sum:= sum + r[i,j];end elsewrite(' ':3);end;writeln;end;writeln(sum);end.