Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Russian");
- cout << "Вывод заполняемой матрицы";
- int i, j, N, M, a[20][20];
- cout << "Введите кол-во строк N = "; cin >> N;
- cout << "Введите кол-во столбцов M = "; cin >> M;
- cout << "Заполните матрицу А \n";
- for (i = 0; i < N; i++)
- for (j = 0; j < M; j++)
- cin >> a[i][j];
- cout << "Матрица А: \n";
- for (i = 0; i < N; i++)
- {
- for (j = 0; j < M; j++)
- cout << a[i][j] << "\t";
- cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement