Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in c++ to read First-name, last-name and the salary from a file. The file must have at least 10 entries. read into

Write a program in c++ to read First-name, last-name and the salary from a file. The file must have at least 10 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 net salary. 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, upto 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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions