loan amount calculation


Submit solution

Points: 20
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

題目說明

<1103檢定考題>
計算每個月應付貸款金額和全部付款金額。
計算公式如下:
11031

輸入

由鍵盤輸入貸款總金額(Loan amount)、每月貸款利率(Monthly interest rate)和貸款年數(Loan period in number of years)

輸出

計算每月應支付的金額(monthlyPayment)和全部支付總金額(totalPayment)後由螢幕輸出,輸出數字請四捨五入至個位數。

sample input & output

輸入 輸出
樣本1 1000000
0.01
1
monthlyPayment: 88849
totalPayment: 1066188
樣本2 25000000
0.03
30
monthlyPayment: 750018
totalPayment: 270006480
樣本3 303000
0.025
3
monthlyPayment: 12863
totalPayment: 463068

Comments

There are no comments at the moment.