# 撰寫程式:
輸入一個員工的姓名和薪水,其中薪水表示每小時的工資,例如9.25美元。
然后詢問該員工上周作業了多少小時,確保可以接收小數小時。
計算總工資。加班作業(每周超過40小時以上的部分)支付正常工資的1.5倍。
輸出這個員工的薪水。
下面是一次運行的結果。
```
Please input the employee's name: Jack
Please input the employee's hourly salary: 10.5
How many hours has the employee worked last week? 47.5
Jack's salary last week is 538.12 dollars.
```
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/114727.html
標籤:Java EE
