Advertisement
semenrbt

Kristina_3.2.1

Feb 4th, 2020
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.49 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #define N 5
  4.  
  5. int main()
  6. {
  7.   int counter = 0;
  8.   int x[N][N] = {{0, 1, 1, 1, 1},
  9.                  {1, 0, 1, 1, 1},
  10.                  {1, 1, 0, 1, 1},
  11.                  {1, 1, 1, 0, 1},
  12.                  {1, 1, 1, 1, 0}};
  13.   for(int i = N-1; i > 0; i--)
  14.   {
  15.     for(int j = 0; j < i; j++)
  16.     {
  17.       if(x[i][j] != x[j][i]) {
  18.         printf("Ne simmetri4na.\n");
  19.         return 0;
  20.       }
  21.     }
  22.   }
  23.   printf("Simmetri4na");
  24.  
  25.  
  26.   return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement