Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1.  
  2. void arrayPrint(int tablica[5][5], int x, int y) {
  3. for (int i = 0; i < x; i++) {
  4. for (int j = 0; j < y; j++) {
  5. cout << tablica[x][y] << " ";
  6. }
  7. cout << endl;
  8. }
  9. }
  10.  
  11. int main() {
  12. const int x = 5;
  13. const int y = 5;
  14. srand(time(NULL));
  15. int tablica[x][y];
  16. for (int i = 0; i < x; i++) {
  17. for (int j = 0; j < y; j++) {
  18. tablica[x][y] = rand() % 10 - 5;
  19. }
  20. cout << endl;
  21. }
  22. arrayPrint(tablica,x,y);
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement