<var housecost, downpayment, mortgageAmount, mortgageAmount1, interestrate, monthlypayment, monthlypayment1, biweeklypayment, amortizationperiod, annualinterest
: real
var monthlyinterest1
: real
var reply
: string
put "House Cost: " ..
get housecost
put "Mortgage Amount: " ..
get mortgageAmount
put "Enter enterest rate in decimal form (example:3%=0.03)"
put "Interest Rate: " ..
get interestrate
%-------------------------------------------------------------------------------
%THIS IN CHART FORM
put "Enter the amount you will be paying per month"
get monthlypayment
color (55)
loop
var monthlyinterest
: real := (mortgageAmount
* interestrate
) /
12
put "Monthly interest: ", monthlyinterest
monthlypayment
:= monthlypayment + monthlyinterest
put "Paid: ", monthlypayment
mortgageAmount
:= mortgageAmount - monthlypayment
put monthlypayment:
10,mortgageAmount:
20
if mortgageAmount < monthlypayment
then
put "Last Payment: ", mortgageAmount
put "Left:0"
color (31)
end if
if mortgageAmount <
0 then
put " "
end if
put "Left: ", mortgageAmount
exit when mortgageAmount <=
0
end loop
color (55)
%--------------------------------------------------------------------------------->