Ascending order within text

I appreciate all the help that I've already received but am running into one problem. I can find how to add something before a file with ascending numbers but not like this. I basically have a file that looks like this:

100
101
102
103
104

I need to add the following before each line with ascending numbers: line num0 file

So in the end, I would need the file to look like this:

line num0 file 100
line num1 file 101
line num2 file 102
line num3 file 103
line num4 file 104

Any help is appreciated.

P.S. Sed would be preferable but any programming language will suffice. Again, thanks.

With awk you can something like:

awk '{print "line num" i++ " file " $0}' file

Regards

#  awk '{print "line num"NR-1" file",$0}' file
line num0 file 100
line num1 file 101
line num2 file 102
line num3 file 103
line num4 file 104

this works if your file is already sorted if not sort it and pass the o/p to this command
awk '{printf "line num%s file %s\n",NR-1,$0}' filename

How about:

cnt="0"
for line in `cat filename`
do
echo "line num${cnt} file ${line}"
cnt=$(( ${cnt} + 1 ))
done

Thank you to everyone. This forum truly has been very helpful. I greatly appreciate everyone taking the time to help.