Guest User

Untitled

a guest
May 25th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. #define SIZE 1000000
  6. /* Author: pppoe2345 */
  7.  
  8. int main (int argc, char *argv[])
  9. {
  10. FILE *outfile;
  11. char *outfile_name = "input";
  12. unsigned long i, num, select;
  13.  
  14. srand (time (NULL));
  15.  
  16. outfile = fopen (outfile_name, "w");
  17. for (i = 0; i < SIZE; i++)
  18. {
  19. select = rand () & 1;
  20. num = (select << 31) | rand ();
  21. fprintf (outfile, "%lu\n", num);
  22. }
  23. fclose (outfile);
  24. return 0;
  25. }
Add Comment
Please, Sign In to add comment