1. ofstream fout; should be inside the function.
2. srand() should be seeded only once outside the for() loop.
3. In case this is not what you want, the hundredths will get skipped. If num < 800 the next should be num >= 800 and not 801 so 800 doesn't get skipped.
One problem you have is that you are leaving out 100, 200, 300, 400, 500, 600, 700, 800, and 900. An example is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
if( num >= 0 && num < 100 )
will get numbers 0 through 99 inclusive:
elseif( num >= 101 && num< 200 )
will get numbers 101 through 199 inclusive.
Either change your first compare to be:
if( num >= 0 && num < 101 )
or
if( num >= 0 && num <= 100 )