Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "matrix.h"
- using namespace std;
- int main() {
- mat m; // matrix declaration
- int r; // matrix rows
- int c; // matrix columns
- vet vs;
- cout << " Load: \n\n";
- loadMatrix(m, r, c);
- cout << " Print: \n\n";
- printMatrix(m, r, c);
- cout << " Sum Rows: \n\n";
- sumRows(m, r, c, vs);
- cout << "Print the vector of sums: \n";
- for (int i = 0; i < r; i++)
- cout << "Row " << i << ". " << vs[i] << endl;
- if (r == c)
- cout << "The sum of the values included between the diagonals is:\n"
- << sumIncluded(m, r, c) << endl;
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment