Create a file with 20 lines of text and name it lines.txt.
Write a program to read this file lines.txt and write the text to a new file, numbered_lines.txt, that will also have line numbers at the beginning of each line.
Input file: lines.txt
Expected output file:
1 Line one
2 Line two
Here is a C++ program that solves the given problem. It uses C++ file operation to process the input file