Finished program. exercise b to d. Will create output files for n=10,100,1000,10000,10000