-->
当前位置:首页 > 题库 > 正文内容

编程题:Loan Calculator

Luz3年前 (2022-10-30)题库375
You take a loan from a friend and need to calculate how much you will owe him after 3 months.
You are going to pay him back 10% of the remaining loan amount each month.
Create a program that takes the loan amount as input, calculates and output the remaining amount after 3 months.

Here is the monthly payment schedule:
Month1
Payment: 10% of 20000 = 2000 Remaining amount: 18000
Month 2
Payment:10% of 18000=1800 Remaining amount: 16200
Month 3:
Payment: 10% of 16200=1620 Remaining amount: 14580


### 输入格式:

input a load amount from user at keyboard

### 输出格式:

output the remaining amount after 3 months.

### Sample lnput:

in
20000


### Sample Output:

out
14580







答案:若无答案欢迎评论

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。