COSC 1315 - Fundamentals of Programming
Allan Kochis
Programming Assignment 4
Using the payment computed in Assignment 2 and 3, this assignment is to produce
a loan repayment schedule. like this:
What is the principle? : 5000
How many years? : 2
What is the annual interest rate? : 12
The monthly payment is : 235.37
Total repayment is : 5648.82
Total Interest is : 648.82
Repayment schedule
Payment Applied to Applied to
Number Payment Interest Principle Balance
1 235.37 50.00 185.37 4814.63
2 235.37 48.15 187.22 4627.41
3 235.37 46.27 189.09 4438.32
4 235.37 44.38 190.98 4247.33
5 235.37 42.47 192.89 4054.44
6 235.37 40.54 194.82 3859.62
7 235.37 38.60 196.77 3662.85
8 235.37 36.63 198.74 3464.11
9 235.37 34.64 200.73 3263.38
10 235.37 32.63 202.73 3060.65
11 235.37 30.61 204.76 2855.89
12 235.37 28.56 206.81 2649.08
13 235.37 26.49 208.88 2440.20
14 235.37 24.40 210.97 2229.24
15 235.37 22.29 213.07 2016.16
16 235.37 20.16 215.21 1800.95
17 235.37 18.01 217.36 1583.60
18 235.37 15.84 219.53 1364.07
19 235.37 13.64 221.73 1142.34
20 235.37 11.42 223.94 918.39
21 235.37 9.18 226.18 692.21
22 235.37 6.92 228.45 463.77
23 235.37 4.64 230.73 233.04
24 235.37 2.33 233.04 -0.00
Press any key to continue
Construct an IPO that requests the principle, interest rate and the
number of years and produces a repayment schedule.