fork(1) download
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <stdlib.h>
  4. #include <time.h>
  5.  
  6. int main()
  7. {
  8. int length=30;
  9. int A[length];
  10. int i, j, Xmin = -1000, Xmax = 1000;
  11. srand(time(NULL));
  12. for (i=0; i<length; i++)
  13. {
  14. A[i]= - 1000 + rand()%(Xmax - Xmin +1);
  15. printf ("%d " , A[i]);
  16. }
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 5304KB
stdin
Standard input is empty
stdout
520 -4 -262 921 -223 -348 -470 -874 -22 -369 892 -127 626 -389 356 869 231 -805 -938 435 -799 35 753 -630 -396 863 -71 -891 422 -53