Q7. 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.
PS: Using C++
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here