Calculate the percentageand & add the percentage to a total

Assignment Help C/C++ Programming
Reference no: EM13939555

I need to write a program to produce a sales report similar to the one below that indicates individual percentage contribution by each employee. The program must allow the user to enter a user id number and sales amount for up to 10 employees, but must allow fewer to be entered if desired, stopping input when the user enters the value zero for an employee id number.

Emp.ID $ Sales % Sales
-------------------------
p12345 $3000.00 30%
24681 $1000.00 10%
35791 $4000.00 40%
48484 $2000.00 20%
-------------------------
Total: $10000.00 100%

My output window should be similar to the following:

Employee ID Number (0 when done)? 12345
Sales volume for this period? $ 3000.00

Employee ID Number (0 when done)? 24681
Sales volume for this period? $ 1000.00

Employee ID Number (0 when done)? 35791
Sales volume for this period? $ 4000.00

Employee ID Number (0 when done)? 48484
Sales volume for this period? $ 2000.00

Employee ID Number (0 when done)? 0

User input complete.

EMPLOYEE SALES WITH PERCENTAGE BREAKDOWN

Emp.ID $ Sales % Sales
-------------------------
12345 $3000.00 30%
24681 $1000.00 10%
35791 $4000.00 40%
48484 $2000.00 20%
-------------------------
Total: $10000.00 100%

Press any key to continue...

I need to declare 3 arrays. The first array will hold the employee ID. The second array will hold the amount of sales for that employee. Finally, the third array will hold the percentage of sales for each employee.

The percentage sales for each employee should be the last thing to be calculated. You have to read the ID and the sales amount first, and as you do that, you accumulate the sales of each employee to a total. To get the percentage of each employee's sales, use the following formula:

Percentage = 100 * Sales Amount/Total Sales

I need to calculate the percentage, add the percentage to a total as well, so that you can print it at the bottom of your sales report table.

Reference no: EM13939555

Questions Cloud

How familiarity with the system aids in cancer management : Give an overview of the lymphatic system. Decribe the anatomical tissues and organs that comprise the lymphatic system.
Which is an advantage of federalism : This system creates some level of consistency (across the U.S. and Oregon) and standards, which is an advantage of federalism, but also prevents local governments from responding directly to the needs of their community, and could result in a pat..
Technical expertise in effective leadership : Communication skills are secondary to technical expertise in effective leadership.
Reward-to-risk ratios for stocks : Stock Y has a beta of 1.6 and an expected return of 16.6 percent. Stock Z has a beta of .8 and an expected return of 9.4 percent. If the risk-free rate is 5.1 percent and the market risk premium is 6.6 percent, the reward-to-risk ratios for stocks Y ..
Calculate the percentageand & add the percentage to a total : I need to declare 3 arrays. The first array will hold the employee ID. The second array will hold the amount of sales for that employee. Finally, the third array will hold the percentage of sales for each employee.
How much will the cost of direct labor increase : Further suppose that production for the next year is expected to increase by an additional 500 units. By how much will the cost of direct labor increase? Cost of supervision?
Post exercise findings and recommendations : 1. How do you plan to manage post exercise findings and recommendations? How will they be reported to the stakeholders? What will the governance structure be? THIS QUESTION NEEDS TO IDENTIFY AND DESCRIBE OUTCOME IMPLEMENTATION PROCESSES
Show an elevated risk for cystic fibrosis in her children : The two main organ systems affected by cystic fibrosis are the respiratory and digestive systems. What is the common ground between these two seemingly dissimilar systems? Why are both affected in cystic fibrosis?
Injecting huge liquidity : We have the X bond which has a duration of 4, a ytm of 12% and a maturity of 25 years. The central bank is injecting huge liquidity, and there is no fear of inflation. If the yields alter by 100 basis points, what would the price change be? If the yi..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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