PLEASE HELP ME WITH THIS PROBLEM

The file data_sales_cs.txt contains annual salary and quarterly sales data (separated by commas) for the employees of Acme Inc. The data is in the following format:

First Name Last Name Annual Salary
Sales (Q1) Sales (Q2) Sales (Q3) Sales (Q4)
Shantell Maag 45551 490 169 68 348

DO NOT MODIFY THE CONTENTS OF THE DATA FILE!

Write a C++ program that reads the data directly from the file and generates output in the following format as seen below (including the table header):

First Name
Last Name
Annual Salary
Sales (Q1)
Sales (Q2)
Sales (Q3)
Sales (Q4)
Total Sales
Average Sales
Pay Raise
New Salary Shantell Maag 45551 490 169 68 348 1075 268.75 911.02 46462.02 Renate Mitchel 51904 297 920 527 495 2239 559.75 2595.20 54499.20 | | | | | | | | | | | | | | | | | | | | | | Pearl Saldivar 60153 630 378 832 752 2592 648.00 3007.65 63160.65 The person with the highest sales is <insert name here> with total sales of <insert total sales here>.

The “Average Sales” value is calculated by dividing the “Total Sales” value by 4. The following criteria should be used to determine an employee’s “Pay Raise”: - “Average Sales” < 250, the employee does not receive a pay raise. - 250 <= “Average Sales” < 500, the employee receives a 2% pay raise. - 500 <= “Average Sales” < 750, the employee receives a 5% pay raise. - “Average Sales” >= 750, the employee receives a 10% pay raise.

The “New Salary” is determined by adding the “Pay Raise” value to the “Annual Salary”.
Do not double-post. Other thread: http://www.cplusplus.com/forum/beginner/226909/
Last edited on
Topic archived. No new replies allowed.