Write a program that reads data from a file

Assignment Help Computer Engineering
Reference no: EM132101095

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.

Reference no: EM132101095

Questions Cloud

How heterotrimeric G proteins involved in decreasing cAMP : In detail, describe how heterotrimeric G proteins are involved in decreasing cAMP accumulation via a G protein-coupled receptor
Develop strategy to maintain nonunion environment : How would you develop a strategy to maintain a nonunion environment?
What are some of the lessons learned : Identify a company and discuss the key to their effective leadership and work motivation. What are some of the lessons learned?
Service from those of its competitor : What are the ways provider tries to make a service tangible to the consumer? How does it try to differentiate its service from those of its competitor?
Write a program that reads data from a file : Write a program that reads data from a file, performs a units conversion, and writes the data to a new file.
Adequate consideration for new noncompete agreement : Lumber Company argued that Houser's continued employment was adequate consideration for the new noncompete agreement.
Marketing planning worth the effort : Is marketing planning worth the effort, especially in the current rapidy changing external/macro environment?
Have you been involved in any six-sigma project : Have you been involved in any six-sigma project? If yes, what kind of project was it? Was it considered a success?
Perpetual inventory system versus a periodic inventory : How are discounts recorded in a perpetual inventory system versus a periodic inventory system?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Calculate button finds charges and displays them in controls

Job Information FormThe Job Information form must have text boxesfor the user to enter the job number, customer name, amount charged forparts, and the hours of labor. Include labels and text boxes for Parts,Labor, Subtotal, Sales Tax, and Total.

  Big data is a term used to describe the voluminous amount

big data is a term used to describe the voluminous amount of structured and semi-structured data generated by

  What is the one-way function in the given system

What is the one-way function in this system? What is the trapdoor in this system? Define the public and private keys in this system.

  Devise a script that takes a filename as argument

Devise a script that takes a filename as argument and looks in the home directory tree to display the listing of all its links.

  Identify two to three of the more common connections

Identify two to three of the more common connections and summarize their associated data rates, typical uses, and approximate costs.

  Who is going to win more games of craps you or the house

In the game of craps, a Pass Line bet proceeds as follows. Over the long run, who is going to win more games of craps, you or the house?

  Find out where html injection is possible

Find out where HTML injection is possible within the service APIs. Write down an HTTP request that inserts an arbitrary image into the UI you constructed

  Implement a function for setting width of displayed ellipses

implement a function for controlling line type tsolid, dashed, dotted of displayed ellipses. Implement a function for setting the width of displayed ellipses.

  What is a work breakdown structure and how is it used

Discuss the traditional and object oriented approach. How are they different? Which would you prefer and why? How does the Agile Development approach fit? What is a Work Breakdown Structure and how is it used?

  Find the phase distortion when the input is given

You are given the system shown in Fig. The output of the system is ;(/). Find the phase distortion when the input is given by.

  Write a java program that allows you to enter your grades

Write a Java program that allows you to enter your grades in this course into an array of floats. Display the grades and the resulting average.

  Lan based attacks

Discuss or describe one or more LAN based attacks (also known as layer 2 attacks or lower layer attacks) or share any additional thoughts you may have on the LAN based attacks.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd