Question
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...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started