SHARE
TWEET

Untitled

a guest Jan 20th, 2020 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void multuplyingMatrix(int** matrix1, int** matrix2, int size) {
  2.     int** multiply = new int* [size];
  3.     for (int i = 0;i < size;i++) {
  4.         multiply[i] = new int[size];
  5.     }
  6.     int result;
  7.     for (int i = 0;i < size;i++) {
  8.         for (int j = 0;j < size;j++) {
  9.             multiply[i][j] = 0;
  10.             for (int k = 0;k < size;k++) {
  11.                 multiply[i][j] += matrix1[i][k] * matrix2[k][j];
  12.                 //multiply[i][j] = result;
  13.             }
  14.  
  15.         }
  16.     }
  17.     cout << endl;
  18.     for (int i = 0;i < size;i++) {
  19.         for (int j = 0;j < size;j++) {
  20.             cout << multiply[i][j] << " ";
  21.         }
  22.         cout << endl;
  23.     }
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top