Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4. #define N 4
  5.  
  6. void lottery(int tab[N][N])
  7. {
  8. int i, j;
  9. srand(time(0));
  10. printf("[\n");
  11. for(i=0; i<N; i++){
  12. for(j=0; j<N; j++){
  13. tab[i][j] = -10 + rand() % 21;
  14. printf("%d\t", tab[i][j]);
  15.  
  16. }
  17. }
  18. printf("\n]\n");
  19. }
  20.  
  21. int main()
  22. {
  23. int tab[N][N];
  24. lottery(tab[N][N]);
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement