fork download
  1. #include <time.h>
  2. #include <stdlib.h>
  3. #include <stdio.h>
  4.  
  5. int main()
  6. {
  7. int A[75];
  8. int min, max, i;
  9. srand(time(NULL));
  10. for (i = 0; i<75; i++)
  11. A[i]= rand() % 25 - 5;
  12.  
  13. min = max = A[0];
  14.  
  15. for (i = 0; i<75; i++)
  16. {
  17. if (A[i] > max)
  18. max = A[i];
  19. if (A[i] < min)
  20. min = A[i];
  21. }
  22.  
  23. printf("%d %d", min, max);
  24. return 0;
  25. }
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
-5 19