Answered step by step
Verified Expert Solution
Question
1 Approved Answer
t Need code in c++ via visual studios TEXT FILES Project 7-3 Sales Profit Write a program to read a sales file, calculate profit per
t
Need code in c++ via visual studios
TEXT FILES Project 7-3 Sales Profit Write a program to read a sales file, calculate profit per salesperson, and print a sales profit report. Input (text file): For each sales record, read and assign data to the following fields. Field size and type are shown in parentheses. I. Salesperson name 2. Total sales 3. Cost of sales (15 char) (8.2 float) (8.2 float) Text File (sales.dat): Use the data given below to create the sales file. The numbers shown above the columns correspond to the fields described for the input: Lisa Conrad Roy Hickle Tara Perkins Dennis Tian 8120.52 6450.71 2245.78 1072.49 12710.14 4567.51 1922 9735.38 Aan Zimmerman 5793.59 4201.45 Output (printer): Print the following sales protit report: Author Page 01 SALES PROFIT REPORT wn/dd/yy Salesperson Total Sales Cost of sales Net Protit X- x 99999.99 99999.99 99999.99 99999.99 Total: Average 99999.99 999999.99 99999.99 X--X 99999.99 Processing Requirements: . Read the sales file . Compute the net profit: total sales-cost of sales Count the number of salespeople. Accumulate a total for net profit. Compute average net profit: total net profit umber of salespeople
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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