fork(2) download
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. int main(void)
  4. {
  5. printf("随机数1为:%d\n",rand());
  6. printf("随机数2为:%d\n",rand());
  7. printf("随机数3为:%d\n",rand());
  8. printf("随机数4为:%d\n",rand());
  9. printf("随机数5为:%d\n",rand());
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
随机数1为:1804289383
随机数2为:846930886
随机数3为:1681692777
随机数4为:1714636915
随机数5为:1957747793