y_ := y;
end;
begin
end.
unit U_Matr_Sk;
interface
uses crt, u_VVOD;
Procedure Mat_Sk(n:integer;Sk:real;A:matrix;var z:matrix);
implementation
procedure Mat_Sk; {ymnogay matricy na skalar}
var i,j : INTEGER;
begin
writeln;
writeln('Skaliar=',sk:0:1);
writeln;
writeln('Nachalnaja matrica');
for i:=1 to n do
begin
for j:=1 to n do
write(a[i,j]:0:1,' ');
writeln;
end;
writeln;
writeln ('--| We have Result |--') ;
for i:=1 to n do
begin
for j:=1 to n do
begin
z[i,j]:=a[i,j]*SK; {Nach:nachalnaya matrica, Rez:matrica rezultata, SK:Skalar}
write(z[i,j]:0:1,' '); { vivod na ekran}
end;
writeln;
end;
end;
end.
unit u_mt_mt;
Interface
uses crt,U_VVOD;
Procedure mt_mt(n: integer; x,y: matrix; var z:matrix);
Implementation
procedure mt_mt;
var i,j,s: integer;
sum: real;
begin
writeln('Vatrica 1');
for i:=1 to n do
begin
for j:=1 to n do
write(x[i,j]:0:1,' ');
writeln;
end;
writeln;
writeln('Matrica 2');
for i:=1 to n do
begin
for j:=1 to n do
write(y[i,j]:0:1,' ');
writeln;
end;
writeln;
for i:=1 to n do
for j:=1 to n do begin
sum:=0;
for s:=1 to n do
sum:=sum+x[i,s]*y[s,j];
z[i,j]:=sum;
end;
Writeln('Matrix is ');
for i:=1 to n do begin
for j:=1 to n do
write(z[i,j]:0:1,' ');
writeln;
end;
end;
end.
unit U_Mult_Matr_Vec;
interface
uses U_VVOD;
procedure Mult_Matr_Vec(n:integer; x:matrix; a:vector;var a1:vector);
implementation
procedure Mult_Matr_Vec;
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.