Explanation:-
First we have to create a file with extension (like .txt) after that by using the program we have to print the file in console screen. Always remember we have to read the file by line by line and also write the file line by line in console screen and one more thing file should be in the same folder in which our program already exists. We can give the file name in console screen so no need to give the filename in a program
Input:
Output:
4 5 1 51 15 151 5 -1
2 2 2 2 2 5 4 4 - 1
3 1 4 8 8 4 8 -1
1 4 4 8 -1
9 8 7 6 5 4 2 1 -1
need an explanation for this answer? contact us directly to get an explanation for this answer