Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int i, j, m, n, a[100][100];
- cout << "Introduceti numarul de linii: ";
- cin >> m;
- cout << "Introduceti numarul de coloane: ";
- cin >> n;
- for(i = 1; i <= m; i++)
- for(j = 1; j <= n; j++)
- {
- if(i > j)
- a[i][j] = i * 10 + j;
- else a[i][j] = j * 10 + i;
- }
- for(i = 1; i <= m; i++) {
- for(j = 1; j <= n; j++)
- cout << a[i][j] << " ";
- cout << endl;
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement