daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Apr 16th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include "../Martix/matrix.h"
  3.  
  4. int main() {
  5.   int n = 10;
  6.   int **mat1 = new int *[n];
  7.   int **mat2 = new int *[n];
  8.   int **result = new int *[n];
  9.   for (int i = 0; i < n; i++) {
  10.     mat1[i] = new int[n];
  11.     mat2[i] = new int[n];
  12.     result[i] = new int[n];
  13.   }
  14.   for (int i = 0; i < n; i++)
  15.     for (int j = 0; j < n; j++) {
  16.       mat1[i][j] = 1;
  17.       mat2[i][j] = 0;
  18.     }
  19.   result = MultMatrix(mat1, mat2, n, n, 2);
  20.   printMatrix(result, n, n);
  21.   deleteMatrix(mat1, n);
  22.   deleteMatrix(mat2, n);
  23.   return 0;
  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