Advertisement
lukasd

zadanie do dokończenia

Dec 16th, 2017
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. void dotablicy(int **a,int n, int m)
  2. {
  3.     int **b;
  4.     *b = (int*)malloc(sizeof(int*)*n);
  5.     for (int i = 0; i < n; i++)
  6.     {
  7.         b[i] = (int*)malloc(sizeof(int)*m);
  8.     }
  9.  
  10.     for (int i = 0; i < n; i++)
  11.     {
  12.         for (int j = 0; j < m; j++)
  13.         {
  14.             b[i][j] = a[i][j];
  15.         }
  16.     }
  17.  
  18. }
  19.  
  20. void kolos1()
  21. {
  22.     int a[8][6];
  23.  
  24.     for (int i = 0; i < 8; i++)
  25.     {
  26.         for (int j = 0; j < 6; j++)
  27.         {
  28.             a[i][j]=rand()%90+10;
  29.             printf("%d ", a[i][j]);
  30.         }
  31.         printf("\n");
  32.     }
  33.  
  34.    
  35.  
  36.    
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement