Advertisement
Guest User

Untitled

a guest
Nov 11th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. #define N 10
  6. int tab[];
  7. int f1()
  8. {
  9. puts("Michal Gizicki - 1ID12B.");
  10.  
  11. }
  12.  
  13. int f2(int tab[])
  14. {
  15. int i;
  16. srand(time(0));
  17.  
  18. for(i =0; i< N; i++)
  19. {
  20. tab[i] = rand() % 21;
  21.  
  22. printf(" %d\n", tab[i]);
  23.  
  24.  
  25. }
  26.  
  27. }
  28.  
  29. int main()
  30. {
  31. f1();
  32. f2(tab);
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement