Question: 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

tt Need code in c++ via visual studios TEXT FILES Project 7-3

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!