program matrixszamitas; uses crt; const nmax=5; type Tmatrix=array[1..nmax,1..nmax] of real; var x,y,z:Tmatrix; n:integer; procedure beolvasas(var n0:integer; var x0:Tmatrix); var i,j:integer; begin write('Hanyas a matrix:'); readln(n0); for i:=1 to n0 do for j:=1 to n0 do begin write(i,',',j,'.elem:'); readln(x0[i,j]); end; end; procedure szorzas(n0:integer; x0,y0:Tmatrix; var z0:Tmatrix); var i,j,k:integer; begin for i:=1 to n0 do for j:=1 to n0 do begin z0[i,j]:=0; for k:=1 to n0 do begin z0[i,j]:=z0[i,j]+x0[i,k]*y0[k,j]; end; end; end; procedure kiiras(n0:integer; z0:Tmatrix); var i,j:integer; begin for i:=1 to n0 do begin for j:=1 to n0 do write(z0[i,j]:2,' '); writeln; end; end; begin clrscr; writeln('Matrix...'); beolvasas(n,x); beolvasas(n,y); szorzas(n,x,y,z); kiiras(n,z); readln; end.