Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
16
Task/Matrix-multiplication/Phix/matrix-multiplication.phix
Normal file
16
Task/Matrix-multiplication/Phix/matrix-multiplication.phix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
function matrix_mul(sequence a, sequence b)
|
||||
sequence c
|
||||
if length(a[1]) != length(b) then
|
||||
return 0
|
||||
else
|
||||
c = repeat(repeat(0,length(b[1])),length(a))
|
||||
for i=1 to length(a) do
|
||||
for j=1 to length(b[1]) do
|
||||
for k=1 to length(a[1]) do
|
||||
c[i][j] += a[i][k]*b[k][j]
|
||||
end for
|
||||
end for
|
||||
end for
|
||||
return c
|
||||
end if
|
||||
end function
|
||||
Loading…
Add table
Add a link
Reference in a new issue