
-----------------------------------
JayShri
Thu Oct 23, 2014 4:22 pm

Text Files and OI
-----------------------------------
What is it you are trying to achieve?
Writing a procedure called reversefile that accepts the name of an existing text file.  The file should be reversed (line by line) to form the output file.  Include reversed line numbers in the output text file.  (Hint: you will have to open and close the input file several times).  Name the output file What is the problem you are having?
Right now, it just takes the last line (the 5th line which is "I am Jay"). And puts that in my output file. I'm 90% sure that I need loops to open and close the input file and seeks/mods in there to get it to work.


Describe what you have tried to solve this problem
Googling how to use seek and mod (didn't get anywhere) and using put and get in my program. 

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
