Write a program that asks the user for the name of a file, and an integer number. The program should display the first several lines of the file on the screen, and the number of lines should be equal...


 Write a program that asks the user for the name of a file, and an integer number. The program should display the first several lines of the file on the screen, and the number of lines should be equal to the integer entered by the user. If the number of lines the file has is less than the integer entered by the user, then the entire file should be displayed, with a message indicating the entire file has been displayed.


When evaluating the peer submissions, please consider two cases to verify the program, with one case where the file has enough lines, and one case where the file does not have enough lines.



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here