SHARE
TWEET

kod za sofiju

Mixilino Apr 19th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.     int M[3][4] = { 1,2,3,4,5,6,7,8,9,10,11,12 };
  5.     int B[2][3];
  6.     int curr1 = 0, curr2 = 0, n = 3, m = 4, r = 1, k = 1;
  7.     for (int i = 0; i < n; i++)
  8.     {
  9.         if (i == r) {
  10.             continue;
  11.         }
  12.         for (int j = 0; j < m; j++)
  13.         {
  14.             if (k == j) {
  15.                 continue;
  16.             }
  17.             else {
  18.                 B[curr1][curr2] = M[i][j];
  19.                 curr2++;
  20.             }
  21.         }
  22.         curr1++;
  23.         curr2 = 0;
  24.     }
  25.     for (int i = 0; i < 3; i++)
  26.     {
  27.         for (int j = 0; j < 4; j++)
  28.         {
  29.             printf("%d\t", M[i][j]);
  30.         }
  31.         printf("\n");
  32.     }
  33.     for (int i = 0; i < 2; i++)
  34.     {
  35.         for (int j = 0; j < 3; j++)
  36.         {
  37.             printf("%d\t", B[i][j]);
  38.         }
  39.         printf("\n");
  40.     }
  41. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top