tips calculator


Submit solution

Points: 100
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
Java 19, Java 8

題目說明

請輸入顧客餐點總金額及服務費比率(%),計算服務費以及總應付金額,並將結果列印出。

輸入

由鍵盤輸入餐點總金額、服務費比率(%),請以空格隔開。輸入資料順序為先餐點總金額、後服務費比率。

輸出

計算服務費、總應付金額後輸出至螢幕。服務費、總應付金額計算請四捨五入至小數點後一位即可

sample input & output

輸入 輸出
DataSet1 10 12 Service charge:1.2,Total payment:11.2
DataSet2 60 18 Service charge:10.8,Total payment:70.8
DataSet3 105 10 Service charge:10.5,Total payment:115.5

Comments

There are no comments at the moment.