fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. int main()
  6. {
  7. srand(time(NULL));
  8.  
  9. printf("1: %d / %d\n", rand(), RAND_MAX);
  10. printf("2: %d / %d\n", rand(), RAND_MAX);
  11. printf("3: %d / %d\n", rand(), RAND_MAX);
  12.  
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
1: 1130086287 / 2147483647
2: 1354413250 / 2147483647
3: 455659172 / 2147483647