As a Christmas gift I have written a small program in Java to calculate primes. My intention was to leave it on all night, calculating the next prime and writing it to a .txt fi
You might consider tracking the number of bytes you write to each file and switching to a new one after some number of bytes. You might also provide a viewer for your files so your friend can see his gift more easily. :)