fork download
  1. #include <stdio.h>
  2.  
  3. static unsigned int x = 123456789;
  4. static unsigned int y = 362436069;
  5. static unsigned int z = 521288629;
  6. static unsigned int w = 88675123;
  7.  
  8. unsigned int randint(void) {
  9. unsigned int t;
  10. t = (x ^ (x << 11));
  11. x = y; y = z; z = w;
  12. w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
  13. return w;
  14. }
  15.  
  16. int main(void) {
  17. int i;
  18. for (i = 1; i < 20; i++) {
  19. printf("%08X\n", randint() % 0x10000000);
  20. }
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
0CA345EA
0B5116E6
051049AA
088D00B0
0EC7825E
0DB24146
0AF81443
0AC00F2C
0837AD58
07906569
0D9031D4
0703EE25
02EBD2F0
06C45EE9
0A16D974
021C7CD5
0EEC4C34
0ABB6616
065AC14C