ThisIsAreku

multiplier tp0

Oct 6th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. // M est le tableau tel que: int M[5][5];
  2. void Mat::Multiplier(Mat& A, Mat& B)
  3. {
  4.   for(int i = 0; i < 5; i++)
  5.   {
  6.     for(int j = 0; j < 5; j++)
  7.     {
  8.       M[i][j] = 0;
  9.       for(int k = 0; k < 5; k++)
  10.       {
  11.       M[i][j] += A.M[i][k] * B.M[k][j];
  12.       }
  13.     }
  14.   }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment