Le A be an M * P matrix array, and let B be a P * N matrix array. This algorithm stores the product of A and B in an M * N matix array C.
1. Repeat Steps 2 to 4 for I = 1 to M:
2. Repeat Steps 3 and 4 for J = 1 to N:
3. Set C[I,J]:=0. [Initializes C(I,J).]
4. Repeat for K = 1 to P.
5. Exit.
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE
1. Repeat Steps 2 to 4 for I = 1 to M:
2. Repeat Steps 3 and 4 for J = 1 to N:
3. Set C[I,J]:=0. [Initializes C(I,J).]
4. Repeat for K = 1 to P.
C(I, J): = C(I, J) + + A[I, K] * B[K, J]
[End of inner loop.]
[End of Step 2 middle loop.]
[End of Step 1 outer loop.]
5. Exit.
0 comments:
Post a Comment