Matrix multiplication: Difference between revisions
Content added Content deleted
Line 525: | Line 525: | ||
<lang Amazing Hopper> |
<lang Amazing Hopper> |
||
#include <hopper.h> |
#include <hopper.h> |
||
main: |
|||
first matrix=0, second matrix=0,a=-1 |
first matrix=0, second matrix=0,a=-1 |
||
{5,2}, |
{5,2},rand array(a),mulby(10),ceil, cpy(first matrix), puts,{"\n"},puts |
||
{2,3}, |
{2,3},rand array(a),mulby(10),ceil, cpy(second matrix), puts,{"\n"},puts |
||
{first matrix,second matrix}, |
{first matrix,second matrix},mat mul, println |
||
exit(0) |
exit(0) |
||
</lang> |
</lang> |
||
Line 536: | Line 536: | ||
#include <natural.h> |
#include <natural.h> |
||
#include <hopper.h> |
#include <hopper.h> |
||
main: |
|||
get a matrix of '5,2' integer random numbers, remember it in 'first matrix' and put it with a newline |
get a matrix of '5,2' integer random numbers, remember it in 'first matrix' and put it with a newline |
||
get a matrix of '2,3' integer random numbers, remember it in 'second matrix' and put it with a newline |
get a matrix of '2,3' integer random numbers, remember it in 'second matrix' and put it with a newline |