Matrix multiplication: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: changed a glyph in a comment.) |
m (→{{header|REXX}}: added/changed comments and whitespace, changed a subroutine name.) |
||
Line 3,925:
=={{header|REXX}}==
<lang rexx>/*REXX program multiplies two matrices together, displays the matrices and the results. */
Arows= r - 1 /*adjust the number of rows (DO loop).*/
Acols= c - 1 /* " " " " cols " " .*/
y.=; y.1= 1 2 3
y.2= 4 5 6
Brows= r - 1 /*adjust the number of rows (DO loop).*/
Bcols= c - 1 /* " " " " cols " " */
Line 3,944:
c.= 0; do i=1 for Arows /*multiply matrix A and B ───► C */
do j=1 for Bcols
end
end
call
call
call
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
{{out|output|text= when using the internal default input:}}
<pre>
|