how do you read a whole line of text from a txt file
can someone please help me with this problem. i need to read the first line of text from a txt file then output it into another txt file, then do the next line of text and so fourth. i also have to number the lines like so "1: asdadasda /n 2: sasdasdad..." and if a line is over 50 chars long i need to put it into multiple lines but the multiple lines dont need to be numbered
output is too look like this
1: Thas if skjhf ieak
2: asdkihjfnoe oi dio
3: Thea ijs ufaio
aksdi askjd oias knj
4: askdjado ij and so fourth.
please help i am so stuck and have been for like 3 hours