#include using namespace std; int matrice[50][50],l,c,k,j; int main() { cout << "Introduceti numarul de linii: "; cin >> l; cout << "\nIntroduceti numarul de coloane: "; cin >> c; cout << "\nIntroduceti elementele matricii: "; for (int i = 0; i < l; i++) { for (int j = 0; j < c; j++) { cin >> matrice[i][j]; } } for (int i = 0; i < l*c; i++) { cout << matrice[i/c][i%c] << " "; if ((i + 1) %c == 0 ) { cout << endl; } } system("pause"); }