Calculate and display the revenue and profit on each item

Assignment Help Computer Engineering
Reference no: EM132208441

Write the program in c++

A program is required to read a series of product sales records from an input file specified by the user. Each line of the file contains an item name (CANNOT HAVE SPACES), quantity sold, cost of item, and price sold:

Item_name qty_sold cost price

Calculate and display the revenue and profit on each item, as well as the total revenue generated by all sales. Write this information to an output file. Your program should prompt for names for both the input and output file.

Here is a sample file to test with, but your program should work with any file that is in this format.

keyboard 20 54.95 75.00

mouse 10 22.50 30.00

output file with this input file

Product Revenue Profit

keyboard $1500.00 $401.00

mouse $300.00 $75.00

Totals $1800.00 $476.00

Reference no: EM132208441

Questions Cloud

From which country to which country will the capital move : Assume Market A represents Egyptian Labor Market (at equilibriam w/p=9$), while Market B represent the Jordanian Labor Market (at equilibrium w/p =8$).
Display the corrected value of the number of days : Write this program in C: A professor will assign homework today and does not want it due on anybody's holy day.
Find demand as functions of choice variables : Consider two firms i= 1,2 in a certain industry. They want to maximize their profit, they have no marginal cost of producing goods.
Get the make and model of the ten cars as structures : Write a program in C++ to get the Make and Model of the ten cars as structures members by user and display it on the screen by Function.
Calculate and display the revenue and profit on each item : A program is required to read a series of product sales records from an input file specified by the user.
Explain the effect of sympathetic stimulation : Explain the effect of both sympathetic and parasympathetic stimulation on each behavior you choose
Why the monopoly firm does not necessarily choose : Explain in your own words why the monopoly firm does not necessarily choose the highest possible price when it offers its output for sale.
Display the total and average calculated : Write a program in C that prompts the user for an integer number from the keyboard, and store it in a variable num.
Why the market cannot determine the optimal quantity : Give an example of a pure public good and explain in your own words why the market cannot determine the optimal (equilibrium) quantity or price for that good.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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