Write a program that asks the user for the name of a file


Please use C++ programming

1. File "HEAD" program:

Write a program that asks the user for the name of a file. The program shold display the first 10 lines of the file on the screen (the "head" 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.

2. File Display Program.

Write a program that asks the user for the name of a file. The program should display the contents of the file on the screen. If the file's contents won't fit on a single screen, the program should display 24 lines of output at a time, and then pause. Each time the program pauses it should wait for the user to strike a key before the next 24 lines are displayed.

3. Data Conversion Program

Write a program that reads data from a file, performs a units conversion, and writes the data to a new file. Offer the user the following choices of conversions: degrees F to degrees C, degrees C to degrees F, feet to meters, meters to feet, ounces to grams, grams to ounces.

In the new file, the first line of the file should indicate the original units and the altered units, and the next lines should have both the input and the converted data. For example:

INPUT:

32.0
0
72

OUTPUT:

degrees F degrees C
32 0
0 -17.78
72 22.22

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program that asks the user for the name of a file
Reference No:- TGS02894345

Expected delivery within 24 Hours