Question: Write a program to read First-name, last-name and the salary from a file. The file must have at least ten entries. Read into an array

"Write a program to read First-name, last-name and the salary from a file. The file must have at least ten entries.

Read into an array all the information. The salary numbers should have reasonable sample of <10k

between 10k and 15k and greater than 20k

hint you will need 3 arrays at least

The program should find the tax and the next salary. The tax rate is:

salary <= 10,000 the tax is 10%

Salary between 10,001 and 20,000 the tax rate is 15% (15 % only on salary greater than 10000, up to 10000 it is still 10%)

salary > 20,000 the tax is 20%. (20 % only on amount greater than 20000, less than that the 10% and 15% rate apply)

As an example, if a person has a salary of 23000

Then his tax is calculated as follows:

tax1 = 10% of 1st 10,000 dollars

tax2 = 15 % of next 10,000 dollars

tax3 = tax on the last 3000

total tax = tax1+tax2+tax3

Print the result in another file

submit code, readme file and screen shots of execution."

I just need a reference point while doing this project; I am using visual studio, c++. It would be ideal to see a working program while I am doing my own. Any help would be much appreciated.

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!