Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- const short N = 5;
- void wypelnij_tablice(short tab[][N])
- {
- for(short i = 0; i < N; ++i)
- for(short j = 0; j < N; ++j)
- tab[i][j] = rand() % 100;
- }
- void wypisz_tablice(short tab[][N])
- {
- for(short i = 0; i < N; ++i)
- {
- for(short j = 0; j < N; ++j)
- cout << tab[i][j] << '\t';
- cout << endl;
- }
- }
- int main()
- {
- short tablica[N][N];
- wypelnij_tablice(tablica);
- wypisz_tablice(tablica);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement