Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ programing language Write a program that asks the user for the name of a file. The program should display the last 10 lines of

C++ programing language Write a program that asks the user for the name of a file. The program should display the last 10 lines of the file on the screen (the "tail" of the file). If the file has fewer than 10 lines, the entire file should be displayed, with a message indicating the entire file has been displayed.

The content of salary.txt

1#23400

4#17000

5#21000

6#12600

9#26700

10#18900

11#18500

13#12000

15#49000

16#56500

20#65000

21#65500

22#78200

23#71000

24#71100

25#72000

30#83000

31#84000

32#90000

Sample Run

Enter the file name: salary.txt

16#56500

20#65000

21#65500

22#78200

23#71000

24#71100

25#72000

30#83000

31#84000

32#90000

Note: all the solution in chegg has problem.Please help me

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

What are the margin requirements for a CFD contract?

Answered: 1 week ago