Advertisement
ProgramoBien

Matrix product

Nov 24th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. typedef vector< vector<int> > Matrix;
  7.  
  8. Matrix product(const Matrix& a, const Matrix& b){
  9.     Matrix s = a;
  10.     int l = a.size();
  11.     for(int i = 0; i < l; ++i){
  12.         for(int j = 0; j < l; ++j){
  13.             int sm = 0;
  14.             for(int
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement