Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, you will still get Wrong Answer because the complete output may be longer and there might be errors in the future lines.
Please double check your code to solve this problem and try again.
Your Answer
Please enter the monthly payment: Please enter the interest rate: Please enter the duration of the loan, in years: Month Principal Interest Balance ----- --------- --------- --------- 1200 -nan -nan -nan 1199 -nan -nan -nan 1198 -nan -nan -nan 1197 -nan -nan -nan 1196 -nan -nan -nan 1195 -nan -nan -nan 1194 -nan -nan -nan 1193 -nan -nan -nan 1192 -nan -nan -nan 1191 -nan -nan -nan 1190 -nan -nan -nan 1189 -nan -nan -nan 1188 -nan -nan -nan 1187 -nan -nan -nan 1186 -nan -nan -nan 1185 -nan -nan -nan 1184 -nan -nan -nan 1183 -nan -nan -nan 1182 -nan -nan -nan 1181 -nan -nan -nan 1180 -nan -nan -nan 1179 -nan -nan -nan 1178 -nan -nan -nan 1177 -nan -nan -
JOJ Answer
Please enter the monthly payment: Please enter the interest rate: Please enter the duration of the loan, in years: Month Principal Interest Balance ----- --------- --------- --------- 1200 1.00 0.00 1.00 1199 1.00 0.00 2.00 1198 1.00 0.00 3.00 1197 1.00 0.00 4.00 1196 1.00 0.00 5.00 1195 1.00 0.00 6.00 1194 1.00 0.00 7.00 1193 1.00 0.00 8.00 1192 1.00 0.00 9.00 1191 1.00 0.00 10.00 1190 1.00 0.00 11.00 1189 1.00 0.00 12.00 1188 1.00 0.00 13.00 1187 1.00 0.00 14.00 1186 1.00 0.00 15.00 1185 1.00 0.00 16.00 1184 1.00 0.00 17.00 1183 1.00 0.00 18.00 1182 1.00 0.00 19.00 1181 1.00 0.00 20.00 1180 1.00 0.00 21.00 1179 1.00 0.00 22.00 1178 1.00 0.00 23.00 1177