NoMatchFound

Untitled

Dec 4th, 2011
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. #include <iostream>
  2. #include "matrix.h"
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     mat m; // matrix declaration
  8.     int r; // matrix rows
  9.     int c; // matrix columns
  10.  
  11.     vet vs;
  12.  
  13.     cout << " Load: \n\n";
  14.     loadMatrix(m, r, c);
  15.     cout << " Print: \n\n";
  16.     printMatrix(m, r, c);
  17.     cout << " Sum Rows: \n\n";
  18.     sumRows(m, r, c, vs);
  19.  
  20.     cout << "Print the vector of sums: \n";
  21.     for (int i = 0; i < r; i++)
  22.         cout << "Row " << i << ". " << vs[i] << endl;
  23.  
  24.     if (r == c)
  25.         cout << "The sum of the values included between the diagonals is:\n"
  26.              << sumIncluded(m, r, c) << endl;
  27.  
  28.     cout << endl;
  29.     return 0;
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment