Post Reply 
Small challenge
09-20-2017, 07:49 PM
Post: #3
RE: Small challenge
(09-20-2017 06:43 PM)Pekis Wrote:  - "Hi, old chap, can you lend me 6000 $ ?"
- "Of course, yes, you can pay me back in two years, with a monthly payment, without any interests but linearly decreasing"

So the total amount over 24 month is 6000 and it's decreasing by a constant amount a each month. So 6000=a*(24*(24+1)/2) or 6000=a*300 or a=20.
The first month payment is $480 (20*24), decreasing by $20 every month.

Code:
  
 1    480     480
 2    460     940
 3    440    1380
 4    420    1800
 5    400    2200
 6    380    2580
 7    360    2940
 8    340    3280
 9    320    3600
10    300    3900
11    280    4180
12    260    4440
13    240    4680
14    220    4900
15    200    5100
16    180    5280
17    160    5440
18    140    5580
19    120    5700
20    100    5800
21     80    5880
22     60    5940
23     40    5980
24     20    6000
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Small challenge - Pekis - 09-20-2017, 06:43 PM
RE: Small challenge - Dieter - 09-20-2017, 07:33 PM
RE: Small challenge - Didier Lachieze - 09-20-2017 07:49 PM
RE: Small challenge - Pekis - 09-20-2017, 07:54 PM
RE: Small challenge - Dieter - 09-20-2017, 08:00 PM
RE: Small challenge - Joe Horn - 09-20-2017, 08:05 PM
RE: Small challenge - AlexFekken - 09-20-2017, 10:57 PM
RE: Small challenge - SlideRule - 09-20-2017, 11:52 PM
RE: Small challenge - AlexFekken - 09-20-2017, 10:51 PM



User(s) browsing this thread: 1 Guest(s)