Паскаль --- uses crt; var a: array[1..100,1..100] of integer; x,y,sum,k,n:integer; begin write('Введите n: '); readln(n); clrscr; for x:=1 to n do begin for y:=1 to n do begin a[x,y]:=random(21)-10; write(a[x,y]:4); end; writeln; end; k:=0; Sum:=0; for x:=1 to n do for y:=x+1 to n do if a[x,y]>0 then begin Sum:=Sum+a[x,y]; inc(k); end; writeln; if k<>0 then write(sum/k:4:2); end.