Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in C++ Brewsters Used Cars, Inc. employs several salespeople. Brewster, the owner of the company, has provided a file that contains sales

Write a program in C++

Brewster’s Used Cars, Inc. employs several salespeople. Brewster, the owner of the company, has provided a file that contains sales records for each salesperson for the past month. Each record in the file contains the following two fields:

• The salesperson’s ID number, as an integer 

• The amount of a sale, as a real number

The records are already sorted by salesperson ID. Brewster wants you to design a program that prints a sales report. The report should show each salesperson’s sales and the total sales for that salesperson. The report should also show the total sales for all salespeople for the month. Here is an example of how the sales report should appear:

 

Brewster's Used Cars, Inc. Sales Report Salesperson ID Sale Amount $10000.00 $12000.00 $5000.00 100 100 100 Total sales for this salesperson: $27000.00 $14000.00 $18000.00 $12500.00 101 101 101 Total sales for this salesperson: $44500.00 102 $13500.00 $14500.00 $20000.00 102 102 Total sales for this salesperson: $48000.00 Total of all sales: $119500.00

Step by Step Solution

3.42 Rating (146 Votes )

There are 3 Steps involved in it

Step: 1

include include using namespace std int main double idamounttotal0previd0grandTotal if... 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

Matlab An Introduction with Applications

Authors: Amos Gilat

5th edition

1118629868, 978-1118801802, 1118801806, 978-1118629864

More Books

Students also viewed these Computer Network questions

Question

4. Greet students at the door to the class every day.

Answered: 1 week ago

Question

Define Administration and Management

Answered: 1 week ago

Question

Define organisational structure

Answered: 1 week ago