Advertisement
Guest User

Untitled

a guest
Apr 16th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement