該計劃有效,但我不知道如果一旦條件設定後如何讓毛支付加上加班工資,我被告知在申報時將加班工資設置爲零。一旦滿足條件,是否有辦法相應地改變加班工資?例如 overtimepay = 50 所以工資總額的公式現在將是漢王* HP + 50添加加班費
#include<iostream>
using namespace std;
int main()
{
float ftax, stax, SDI, SS, hw, hp, pay, netpay, gp, OvertimePay = 0;
cout << "please enter the hoursWorked: ";
cin >> hw;
cout << "---------------------" << endl;
cout << "please enter the hourlyPay: ";
cin >> hp;
gp = hw * hp + (OvertimePay);
ftax = gp*.10;
stax = gp*.08;
SDI = gp*.01;
SS = gp*.06;
netpay = gp - (ftax + stax + SDI + SS);
cout << " grosspay = " << gp << endl;
cout << "---------------------" << endl;
cout << " federal taxes = " << ftax << endl;
cout << "---------------------" << endl;
cout << " state taxes = " << stax << endl;
cout << "---------------------" << endl;
cout << " SDI = " << SDI << endl;
cout << "---------------------" << endl;
cout << " Social Securities = " << SS << endl;
cout << "---------------------" << endl;
cout << " netpay = " << netpay << endl;
cout << "---------------------" << endl;
if(hw > 40)
cout << "OvertimePay = " << (hw - 40) * hp * 0.5 << endl;
system("pause");
}
我建議你離開代碼一分鐘,用鉛筆和紙製作一個例子。 –
無關:在我最瘋狂的夢想中,我的聯邦稅收負擔是10%。這是24%*短*。而FICA是[7.65%](http://www.ssa.gov/pressoffice/factsheets/colafacts2014.html)(x2但你的老闆得付另一半)。你的老師需要更新他們的材料= P – WhozCraig