0
How to write a program to create a txt file and write five lines to it
3 Respuestas
+ 1
Here you can see how can be done it:
https://code.sololearn.com/cPB5asMrV1rw/?ref=app
0
If using C++, you can achieve this by including the 'fstream' header file, and using it's function 'ofstream("filename.txt");' in your main method to create the txt file and then use the object to write the 5 lines inside a while loop.