Program For Making A Table With A Double Nested For-Loop: The Output

PAYING OFF A LOAN IN MONTHLY INSTALLMENTS

Approximate Total Interest Paid And Years To Pay Off
For Given Yearly Interest Rate And Size Of Monthly Payment


("Infinity" means the monthly payment is too low.
In these cases the loan will never be repaid.
Warning: the first entry under the last
"infinity" in a column can be very 
inaccurate.)

                  rates ----> 
   payment      9.0%        10.0%        11.0%        12.0%   

      7.50  Infinity| !  Infinity| !  Infinity| !  Infinity| !
      7.75   2561.74|38  Infinity| !  Infinity| !  Infinity| !
      8.00   1968.50|31  Infinity| !  Infinity| !  Infinity| !
      8.25   1647.56|27  Infinity| !  Infinity| !  Infinity| !
      8.50   1434.49|24   3027.15|39  Infinity| !  Infinity| !
      8.75   1278.73|22   2210.05|31  Infinity| !  Infinity| !
      9.00   1158.16|20   1822.60|26  Infinity| !  Infinity| !
      9.25   1061.20|19   1576.59|23   3774.09|43  Infinity| !
      9.50    981.04|17   1400.69|21   2487.61|31  Infinity| !
      9.75    913.38|16   1266.27|19   2009.19|26  Infinity| !
     10.00    855.32|15   1159.06|18   1723.21|23  35223.57|302
     10.25    804.83|15   1070.91|17   1524.32|21   2825.41|31
     10.50    760.44|14    996.79|16   1374.68|19   2212.71|25
     10.75    721.05|13    933.36|15   1256.49|17   1876.57|22
     11.00    685.82|13    878.31|14   1159.95|16   1650.85|20
     11.25    654.09|12    829.98|14   1079.14|15   1484.22|18
     11.50    625.35|12    787.15|13   1010.22|15   1354.11|17
     11.75    599.16|11    748.86|12    950.55|14   1248.65|16
     12.00    575.20|11    714.40|12    898.26|13   1160.84|15
     12.25    553.18|11    683.19|11    851.97|13   1086.24|14
     12.50    532.87|10    654.78|11    810.64|12   1021.84|13
     12.75    514.06|10    628.77|11    773.47|12    965.52|13
     13.00    496.60|10    604.88|10    739.83|11    915.75|12
     13.25    480.33| 9    582.83|10    709.21|11    871.37|12
     13.50    465.14| 9    562.42|10    681.20|10    831.50|11
     13.75    450.92| 9    543.47| 9    655.46|10    795.43|11
     14.00    437.57| 9    525.81| 9    631.72|10    762.62|10
     14.25    425.02| 8    509.32| 9    609.74| 9    732.62|10
     14.50    413.20| 8    493.87| 9    589.33| 9    705.07|10
     14.75    402.04| 8    479.38| 8    570.32| 9    679.66| 9
     15.00    391.49| 8    465.75| 8    552.56| 9    656.14| 9
     15.25    381.49| 8    452.90| 8    535.92| 8    634.30| 9
     15.50    372.01| 7    440.77| 8    520.31| 8    613.96| 9
     15.75    363.00| 7    429.30| 8    505.63| 8    594.96| 8
     16.00    354.44| 7    418.43| 7    491.79| 8    577.16| 8
     16.25    346.28| 7    408.12| 7    478.72| 8    560.46| 8
     16.50    338.49| 7    398.33| 7    466.35| 7    544.74| 8
     16.75    331.06| 7    389.01| 7    454.64| 7    529.93| 8
     17.00    323.96| 6    380.13| 7    443.52| 7    515.95| 7
     17.25    317.17| 6    371.66| 7    432.96| 7    502.71| 7
     17.50    310.66| 6    363.57| 6    422.91| 7    490.17| 7
     17.75    304.42| 6    355.83| 6    413.33| 7    478.27| 7
     18.00    298.44| 6    348.43| 6    404.19| 7    466.96| 7
     18.25    292.69| 6    341.34| 6    395.46| 6    456.19| 7
     18.50    287.16| 6    334.55| 6    387.12| 6    445.94| 7
     18.75    281.85| 6    328.02| 6    379.13| 6    436.15| 6
     19.00    276.73| 6    321.76| 6    371.47| 6    426.79| 6
     19.25    271.80| 6    315.73| 6    364.13| 6    417.85| 6
     19.50    267.05| 5    309.93| 6    357.08| 6    409.29| 6
     19.75    262.46| 5    304.35| 6    350.31| 6    401.08| 6
     20.00    258.04| 5    298.97| 5    343.80| 6    393.21| 6


(Keep in mind that after the the loan is paid off,
one can invest the amount of the payment instead
each month.  This can make the difference in wealth
due to paying off the loan early much greater than 
what this chart shows.)