Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. Postovani kolega,
  2.  
  3. Evo ispravljene vase funkcije. Ako nije jasno kako radi javite se...
  4.  
  5. void kopiraj(int matrica1[][3], int matrica2[][3])
  6. {
  7. int brojac=1;
  8. int brojacRed = 0;
  9. int brojacKol = 0;
  10. for (int i = 0; i < 4; i++)
  11. {
  12. for (int j = 0; j < 3; j++)
  13. {
  14. brojac++;
  15. if (brojac%2!=0)
  16. {
  17. matrica2[brojacRed][brojacKol++] = matrica1[i][j];
  18. if(brojacKol%3==0)
  19. {
  20. brojacRed++;
  21. brojacKol=0;
  22. }
  23.  
  24. }
  25.  
  26. }
  27. }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement