Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
29
Task/Matrix-transposition/Zonnon/matrix-transposition.zonnon
Normal file
29
Task/Matrix-transposition/Zonnon/matrix-transposition.zonnon
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
module MatrixOps;
|
||||
type
|
||||
Matrix = array {math} *,* of integer;
|
||||
|
||||
|
||||
procedure WriteMatrix(x: array {math} *,* of integer);
|
||||
var
|
||||
i,j: integer;
|
||||
begin
|
||||
for i := 0 to len(x,0) - 1 do
|
||||
for j := 0 to len(x,1) - 1 do
|
||||
write(x[i,j]);
|
||||
end;
|
||||
writeln;
|
||||
end
|
||||
end WriteMatrix;
|
||||
|
||||
procedure Transposition;
|
||||
var
|
||||
m,x: Matrix;
|
||||
begin
|
||||
m := [[1,2,3],[3,4,5]]; (* matrix initialization *)
|
||||
x := !m; (* matrix trasposition *)
|
||||
WriteMatrix(x);
|
||||
end Transposition;
|
||||
|
||||
begin
|
||||
Transposition;
|
||||
end MatrixOps.
|
||||
Loading…
Add table
Add a link
Reference in a new issue