the peak of COVID-19, most worker started working from home. Salaries of workers were reduced by 30%. Assuming income tax was also reduced by 50% from the previous rate of 15% and workers were paid on the number of hours worked in a month and each worker is supposed to work a total of 170 hours in a month. All overtime has been cancelled. If a worker does not meet the 170 hours’ threshold for a month, 5% is deducted from the salary. Assuming the hourly rate is GHC 10, Write a c++ program for the scenario narrated above. Your program should: a) request for an employee’s name, the number of hours worked in a month b) define a function called payRole, your function should compute a worker’s salary and income tax and any deductions if any c) your program should display the results in “b” above. d) explain the logic behind the code especially the function
Language C++
At the peak of COVID-19, most worker started working from home. Salaries of
workers were reduced by 30%. Assuming income tax was also reduced by 50%
from the previous rate of 15% and workers were paid on the number of hours
worked in a month and each worker is supposed to work a total of 170 hours in
a month. All overtime has been cancelled. If a worker does not meet the 170
hours’ threshold for a month, 5% is deducted from the salary. Assuming the
hourly rate is GHC 10, Write a c++
Your program should:
a) request for an employee’s name, the number of hours worked in a
month
b) define a function called payRole, your function should compute a
worker’s salary and income tax and any deductions if any
c) your program should display the results in “b” above.
d) explain the logic behind the code especially the function
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images