Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int macierz[50][50], m, n, a;
- cout << "Number of raws: ";
- cin >> m;
- cout << "Number of columns: ";
- cin >> n;
- cout << "MAX number: ";
- cin >> a;
- cout << endl;
- for (int i = 0; i < m; i++)
- {
- for (int j = 0; j < n; j++)
- {
- macierz[i][j] = 1 + rand() % a;
- cout << macierz[i][j] << " ";
- }
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement