--------------------------------------------- ------------------------ Net Take Home Pay:$ 409.04 净支票计算器 员工姓名: John Smith 一周工作小时数:82 员工家属人数:4 - -------------------------------------------------- ------------------ 员工姓名:John Smith 家属人数:4 营业时间:82 加班时间:42 总收入:$ 1255.60 国家税收@ 5%:$ 62.78 联邦预扣税款@ 14%:$ 175.78 工人及2户家属保险:$ 80.00 额外供养s'保险:$ 50.00 ------------------------------------- -------------------------------- Net Take Home Pay:$ 887.04 我尝试了什么: i已完成此部分但无法进行了解问题的下一部分...编写一个程序,该程序将以员工的名义(使用getline),一周工作小时数和受抚养人数作为输入。An employee is paid at a rate of $17.25 per hour for up to 40 regular hours worked in a week. If the employee works more than 40 hours, it is considered overtime. Any hours over 40 hours but less than or equal to 60 are paid at the overtime rate ($12.34 per hour). Any hours over 60 hours but less than equal to 80 hours are paid at the overtime rate ($14.34 per hour). Any hours over 80 hours are paid at the overtime rate ($16.00 per hour).From the worker’s gross pay, 14% is withheld for federal income tax, 5% is withheld for state income tax. $80 is withheld to cover the insurance of the worker and 2 dependents. If the worker has more than 2 dependents, then an additional $25 is withheld per dependent for insurance. Write a program that will read in the name of the employee (use getline), number of hours worked in a week and the number of dependents as input. The program should then output the worker’s name, number of dependents, gross pay, each withholding amount, and the net take-home pay for the week.Note the money amount displayed should be in fixed point, show point and exactly 2 significant digits after the decimal point.Note that the ONLY INPUTS the user provides are- The employee’s name.- The number of hours worked in the week.- The number of dependents.Below are four Sample I/ONet Paycheck CalculatorEmployee's Name: John SmithNumber of Hours Worked in a Week: 43Number of Employee's Dependents: 3---------------------------------------------------------------------Employee's name :John SmithNumber of Dependents :3Hours worked :43Overtime hours :3Gross Income :$727.02State Tax Withheld @ 5% :$36.35Federal Tax Withheld @ 14% :$101.78Worker and 2 Dependents' Insurance :$80.00Additional Dependents' Insurance :$25.00---------------------------------------------------------------------Net Take Home Pay :$483.89Net Paycheck CalculatorEmployee's Name: John SmithNumber of Hours Worked in a Week: 63Number of Employee's Dependents: 0---------------------------------------------------------------------Employee's name :John SmithNumber of Dependents :0Hours worked :63Overtime hours :23Gross Income :$979.82State Tax Withheld @ 5% :$48.99Federal Tax Withheld @ 14% :$137.17Worker and 2 Dependents' Insurance :$80.00Additional Dependents' Insurance :$0.00---------------------------------------------------------------------Net Take Home Pay :$713.65Net Paycheck CalculatorEmployee's Name: John SmithNumber of Hours Worked in a Week: 35Number of Employee's Dependents: 2---------------------------------------------------------------------Employee's name :John SmithNumber of Dependents :2Hours worked :35Overtime hours :0Gross Income :$603.75State Tax Withheld @ 5% :$30.19Federal Tax Withheld @ 14% :$84.53Worker and 2 Dependents' Insurance :$80.00Additional Dependents' Insurance :$0.00---------------------------------------------------------------------Net Take Home Pay :$409.04Net Paycheck CalculatorEmployee's Name: John SmithNumber of Hours Worked in a Week: 82Number of Employee's Dependents: 4---------------------------------------------------------------------Employee's name :John SmithNumber of Dependents :4Hours worked :82Overtime hours :42Gross Income :$1255.60State Tax Withheld @ 5% :$62.78Federal Tax Withheld @ 14% :$175.78Worker and 2 Dependents' Insurance :$80.00Additional Dependents' Insurance :$50.00---------------------------------------------------------------------Net Take Home Pay :$887.04What I have tried:i have done this part but could'nt able to understand the next part of the question...Write a program that will read in the name of the employee (use getline), number of hours worked in a week and the number of dependents as input.推荐答案每小时17.25,一周工作40小时。如果员工工作超过40小时,则视为加班。超过40小时但小于或等于60的任何小时都按加班费率支付(17.25 per hour for up to 40 regular hours worked in a week. If the employee works more than 40 hours, it is considered overtime. Any hours over 40 hours but less than or equal to 60 are paid at the overtime rate (每小时12.34)。超过60小时但小于等于80小时的任何小时都按加班费率支付(12.34 per hour). Any hours over 60 hours but less than equal to 80 hours are paid at the overtime rate (每小时14.34)。超过80小时的任何小时都以加班费率支付(14.34 per hour). Any hours over 80 hours are paid at the overtime rate ( 这篇关于嗨,我对以下C ++程序感到困惑。寻求帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-21 15:12