161k views
3 votes
Analyze the given code

For I = 1 to n

For j = 1 to n

C =[i.j] = 0

For k=1 to n

C[i.j] = c [i.j] + a[i.k] * b[k.j]

End

End

end

User Wingear
by
8.0k points

1 Answer

1 vote

Answer:

Following are the description to the given code:

Explanation:

In the given code, three for loop are used that uses the variable "I, J, and K", which starts from 1 and ends when it equal to the value of the "n".

Inside the "I and J" loop, another variable "C" is defined, which uses "i,j" and assign a value, that is equal to 0. In the "k" loop, it uses the "c[i.j]" to multiply the value of "a[i.k] and b[k.j]".

In other words, we can say, it calculates the multiplication of the matrix and stores its calculated value.

User Qdii
by
8.2k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.