Advertisement
Guest User

Untitled

a guest
Feb 18th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. #include <stdio.h>
  2. #include<time.h>
  3. #include<stdlib.h>
  4.  
  5. #define ROZ 6
  6.  
  7. main() {
  8.     int tab[ROZ][ROZ];
  9.     int i, j;
  10.  
  11.     srand(time(NULL));
  12.     for (i = 0; i < ROZ; i++)
  13.     {
  14.         for (j = 0; j < ROZ; j++)
  15.         {
  16.             tab[i][j] = rand() % 101 + 1;
  17.             if (tab[i][j]%2== 0) tab[i][j] += 1;
  18.         }
  19.     }
  20.  
  21.     for (i = 0; i < ROZ; i++)
  22.     {
  23.         for (j = 0; j < ROZ; j++)
  24.         {
  25.             printf("%3d", tab[i][j]);
  26.         }
  27.         printf("\n");
  28.     }
  29.  
  30.  
  31.     for (i = 0; i < ROZ; i++)
  32.     {
  33.         for (j = 0; j < ROZ; j++)
  34.         {
  35.             if (tab[i][j] > 2)
  36.             {
  37.            
  38.             }
  39.         }
  40.     }
  41.  
  42.    
  43.  
  44.     system("PAUSE");
  45.     return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement