Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #define _CRT_SECURE_NO_WARNINGS
  4.  
  5. //4.8.2018 PROGRAMIRANJE 2
  6. int main() {
  7.  
  8. const int N = 3;
  9. const int M = 4;
  10.  
  11. int matrica[N][M];
  12. int i, j;
  13. for (i = 0; i < N; i++)
  14. {
  15. for (j = 0; j < M; j++)
  16. {
  17. printf("Upisite matrica[%d][%d]: ", i, j);
  18. scanf("%d", &matrica[i][j]);
  19. }
  20. }
  21.  
  22. for (i = 0; i < N; i++)
  23. {
  24. for (j = 0; j < M; j++)
  25. {
  26. if (i+j < M - 1) {
  27. printf("%d ", matrica[i][j]);
  28. }
  29. else {
  30. printf(" ");
  31. }
  32. }
  33. printf("\n");
  34. }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement