I am making a program that shows the contents of the .txt file when asked for. My program does everything correctly, but I need to have the line number followed by a colon before each line, I am unable to get that to work correctly in the program. Any help would be great.
For example. If the first line is "The dog is big", i need the output to display '1:The dog is big' and the 2nd line needs '2:' before the words and so forth