是一種非常流行的編程語言,可以用于各種計算任務,包括工資計算。下面是一種
1.輸入員工的工資基數和應繳納的五險一金費用
put('請輸入員工的工資基數'))suranceput('請輸入員工應繳納的五險一金費用'))
2.計算員工的應發工資
surance
3.根據稅前工資計算稅額
if gross_salary<= 5000
tax = 0
elif gross_salary<= 8000
tax = (gross_salary - 5000) 0.03
elif gross_salary<= 17000
tax = (gross_salary - 8000) 0.1 + 90
elif gross_salary<= 30000
tax = (gross_salary - 17000) 0.2 + 990
elif gross_salary<= 40000
tax = (gross_salary - 30000) 0.25 + 3590
elif gross_salary<= 60000
tax = (gross_salary - 40000) 0.3 + 6090
elif gross_salary<= 85000
tax = (gross_salary - 60000) 0.35 + 12090
tax = (gross_salary - 85000) 0.45 + 20840
4.計算員工的實發工資
et_salary = gross_salary - tax
5.輸出員工的實發工資
tet_salary)
以上就是。在實際工作中,可以根據具體的情況進行修改和優化,以滿足不同的需求。