0

calculate tax for employees in c++

I need help on how to calculate tax in c++ for employees not more than 100 people First 50,000 of the salary is taxed at 5%, the next 100,000 is taxed at 8%, while the remaining balance of the salary is taxed at 10%, write a C++ program to compute the taxes of the state workers. Your program is to accept workers' salaries as inputs and output the taxes of the workers. The program should be able to compute for as many workers as possible and terminate when there is no other worker's record to process. A worker that receives 50,000 or less will only be taxed at 5%. A worker that earns above 50,000 but not more than 150,000 shall be taxed as follows: 5% for the first 50,000 and 8% for the balance. For workers that earn above 150,000, the tax is as follows: 5% for the first 50,000 8% for the next 100,000 and 10% for the balance.

21st Aug 2021, 11:55 AM
Kelly Kevin Okosodo
1 Odpowiedź
+ 4
Kelly Kevin Okosodo , not clear for me where you get stuck. the best would be if you try to put it together in a code as good as you can. do it step by step. take inputs, use a conditional statement that handles the different tax rates. if you still have a problem, come back and ask something more specific, and also show your code here. happy coding and good success!
21st Aug 2021, 1:33 PM
Lothar
Lothar - avatar