Code: JAVA
// random number between 0 AND 10
  import java.util.Random;
  Random r = new Random();
  int randInt = r.nextInt(10);
Isnt this looping 4294967296 times give you what you are looking for. Now using the FileReader and FileWriter classes will help you write them to file and read from there.