hi again, i have the following code which gives m1^2 (m1 is a user defined square matrix).
My whole program should compute the m1 + m1^2 + m1^3 +..+ m1^nCode:for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
mult[i][j]=0;
for(r=0;r<n;r++)
{
mult[i][j] += m1[i][r]*m1[r][j];
}
}
}
My question here is how can i add another m1 in this loop?