Help me to understand. Initially, I introduced and derived the matrix through the procedure, and then I want to turn to this matrix (and not introduce a new one) and process it. It produces a maximum of 0. Why?
How to make it so that I once entered the matrix, and then already through different functions and procedures I processed it?
Here is the code: http://pastebin.com/CHMBUGx4
Program brain; uses crt; type matr= array [1..50, 1..50] of integer; var a:matr; procedure vvod(i, j, n: integer ; a:matr); //ввод матрицы begin for i:=1 to n do for j:=1 to n do read(a[i,j]); readln; begin for i:=1 to n do begin for j:= 1 to n do write(' ',a[i, j]); writeln; writeln; end; end; end; function maxelem {var a:matr;}( n:integer; var a:matr):real; var //a:matr; max:real; i, j: integer; begin max:=a[1,1]; for i:=1 to n do for j:=1 to n do if max < a[i,j] then max:=a[i,j]; writeln('max= ', max); end; begin var n, i, j:integer; writeln('введите размерность квадратной матрицы'); write ('n= '); readln( n); writeln('впишите элементы квадратной матрицы'); writeln; vvod(i,j,n,a); maxelem(n, a); end.