Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void arrayPrint(int tablica[5][5], int x, int y) {
- for (int i = 0; i < x; i++) {
- for (int j = 0; j < y; j++) {
- cout << tablica[x][y] << " ";
- }
- cout << endl;
- }
- }
- int main() {
- const int x = 5;
- const int y = 5;
- srand(time(NULL));
- int tablica[x][y];
- for (int i = 0; i < x; i++) {
- for (int j = 0; j < y; j++) {
- tablica[x][y] = rand() % 10 - 5;
- }
- cout << endl;
- }
- arrayPrint(tablica,x,y);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement