-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
25 lines (17 loc) · 733 Bytes
/
main.cpp
File metadata and controls
25 lines (17 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
#include <string>
#include "matrices.hpp"
int main() {
try {
matrix m1, m2;
std::cout << "Input first matrix (rows and columns on the first line, matrix on the following lines, all separated by spaces)" << std::endl;
std::cin >> m1;
std::cout << "Input second matrix (rows and columns on the first line, matrix on the following lines, all separated by spaces)" << std::endl;
std::cin >> m2;
std::cout << "First matrix:\n" << m1 << "Second matrix: \n" << m2 << "Matrix multiplication: \n" << m1 * m2 << std::endl;
} catch (std::exception& e) {
std::cerr << e.what() << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}