Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Matrix.hpp"
- #include <iostream>
- int main() {
- int size_A, size_B;
- std::cout << "Enter matrix A size: ";
- std::cin >> size_A;
- Matrix A(size_A);
- std::cout << "Enter elements of matrix A:\n";
- std::cin >> A;
- std::cout << "Matrix A:\n" << A;
- std::cout << "Transpose of A:\n" << A.transpose();
- std::cout << "Enter matrix B size: ";
- std::cin >> size_B;
- Matrix B(size_B);
- std::cout << "Enter elements of matrix B:\n";
- std::cin >> B;
- Matrix C = A + B;
- std::cout << "A + B =\n" << C;
- Matrix D = A * B;
- std::cout << "A * B =\n" << D;
- std::cout << "Determinant of A: " << A.determinant() << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement