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. printf("Массив до:\n");
  9. int length=30;
  10. int A[length];
  11. int i, j, Xmin = -1000, Xmax = 1000;
  12. srand(time(NULL));
  13. for (i=0; i<length; i++)
  14. {
  15. A[i]=-1000+rand()%(Xmax-Xmin+1);
  16. printf("%d ", A[i]);
  17. }
  18. printf("Массив после:\n");
  19. int min=-1000;
  20. return 0;
  21. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
Массив до:
-155 -993 -630 479 526 -987 -452 -808 -838 -972 158 -585 -544 -738 -923 865 -496 -506 -301 -827 986 -495 840 -579 -294 54 25 980 695 611 Массив после: