Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. #define N 5
  6. #define M 30
  7.  
  8. int main(){
  9.   int polje[N][M];
  10.   int n;
  11.  
  12.   printf("Unesi velicinu stupaca: \n");
  13.   do{
  14.     scanf("%d",n);
  15.   }while(n<=19||n>30);
  16.  
  17.   srand((unsigned)time(NULL));
  18.  
  19.   for(int i=0;i<N;i++){
  20.     for(int j=0;j<n;j++){
  21.       polje[i][j]= -14 + (int)rand() / RAND_MAX * 10;
  22.     }
  23.   }
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement