Question: Ref: Chapter 12 Programming Challenge #5 (page 714) Write a program that requests a file name, and reads in the lines from the text file

 Ref: Chapter 12 Programming Challenge #5 (page 714) Write a program

Ref: Chapter 12 Programming Challenge #5 (page 714) Write a program that requests a file name, and reads in the lines from the text file and displays them with line numbers and a colon (file contents shown below). Limit the display to 24 lines at a time per the text instructions. The program may require two (2) cin.get() functions to pause correctly. The output of the line numbers will be right aligned as shown below. The program may be handled solely in main. The text for the file is below. Include an IPO submission with the lab (extra credit). Grading will be based on meeting all of the lab requirements, adherence to programming standards, operation and accurate output, and programming style including white space and indentation. Sample Screen Capture. X "E:\BCC\Spring 2018\CSE 111 New Book\Labs and Solutions CSE 111 NEW\Lab... Enter the file name: data.txt 1:line 1 from the file 2:line 2 3:line 3 4:line 4 5:--- 6: Write a program that 7:reads in the 8:lines from a text file 9: and displays 10: them with line numbers 11:and a colon. 12:Limit the display to 24 13:lines at a time 14:per the instructions. 15: You can hard code the 16:file name if 17: needed. 18:--- 19: Write a program that 20:reads in the 21:lines from a text file 22:and displays 23: them with line numbers 24: and a colon. Press ENTER to continue... 25: Limit the display to 24 26:lines at a time 27: per the instructions. 28: You can hard code the 29: file name if 30: needed. 31

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!