Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <time.h>
- using namespace std;
- const int N = 2;
- const int P = 2;
- int main()
- {
- int a[N][P];
- int opred;
- setlocale(LC_ALL, "Rus");
- srand(time(NULL));
- cout << " Найти определитель матрицы " << endl;
- cout << "Вывод элементов" << endl;
- for (int i = 0; i < N; i++)
- {
- for (int j = 0; j < P; j++)
- {
- a[i][j] = rand() % 12;
- cout << a[i][j] << " ";
- }
- cout << endl;
- }
- cout << "Определитель равен" << endl;
- opred = a[0][0] * a[1][1] - a[0][1] * a[1][0];
- cout << opred;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement