Hi, I'm wondering if someone can help get me started on this. I sat down to do it and realized I couldn't. lol

This is what I'm trying to do:

I have an output file that I want to append. The tricky part is I want to scan in the last number listed in the file, add to it another number, then print the sum onto the next line. Then do it again, so scan in the sum I just printed (now the last number listed), add a number, and print the new sum on the next line.

Just in case that was confusing this is what I mean.

In the file I have

1

So I take 1 and add 2 so I have

1

2

Then I take 2 and add 3 so I have

1

2

5

etc.

I was using "a+" to open the file... I didn't get very far.

Any suggestions appreciated.

Thanks.