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