How to print line by line of text file content?
Here is my example. I have one text file called myprofile with 3 line as follow:
line 1 : myname
line 2 : myage
line 3 : mydob
I want the program to read this myprofile.txt and assign line by line to a variable until end of file. Then print out this text file content.