Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

I have to create pseudocode for a Loan Calculator program...?

The application will accept an Annual Percentage Rate, a Period of Time (in years), and a Principal Loan Amount. The program will then calculate and output the loan payments based on Interest Amount, Principal Amount, and Total Payment in addition to the Total Amount paid on the loan.

Calculations should be based on the following:

Interest = APR / 12 (i.e. Interest = 8%/12 = .00667)

Balance = Current Value

Number of Payments = Period of Time * 12 (12 payments per year)

Discount = (((1 + Interest)^Number of Payments) – 1) / (Interest * (1 + Interest)^Number of Payments)

Payment = Principal Loan Amount / Discount

Interest Payment = Interest * Balance

Principal Payment = Payment – Interest Payment

The output should display the information below on a console: 

Annual Percentage Rate: 8%

Principal Loan Amount: $10,000.00

Period of Time (Years): 2

Interest: 0.0066667

Number of Payments: 24

Discount: 22.110544

Payment: $452.27

Cost of Loan: $10,854.55

Payment # Interest Principal Balance

1 $66.67 $385.61 $9,614.39

2 $64.10 $388.18 $9,226.22

3 $61.51 $390.76 $8,835.45

4 $58.90 $393.37 $8,442.08

5 $56.28 $395.99 $8,046.09

6 $53.64 $398.63 $7,647.46

7 $50.98 $401.29 $7,246.17

8 $48.31 $403.97 $6,842.20

9 $45.61 $406.66 $6,435.54

10 $42.90 $409.37 $6,026.17

11 $40.17 $412.10 $5,614.08

12 $37.43 $414.85 $5,199.23

13 $34.66 $417.61 $4,781.62

14 $31.88 $420.40 $4,361.22

15 $29.07 $423.20 $3,938.03

16 $26.25 $426.02 $3,512.01

17 $23.41 $428.86 $3,083.15

18 $20.55 $431.72 $2,651.43

19 $17.68 $434.60 $2,216.83

20 $14.78 $437.49 $1,779.34

21 $11.86 $440.41 $1,338.93

22 $8.93 $443.35 $895.58

23 $5.97 $446.30 $449.28

24 $3.00 $449.28 ($0.00)

------

I have all the calculations Declarations and a general idea that I'm supposed to output the APR-Cost of Loan before I should run the detailLoop() that calculates the balance and such after each payment. Am I correct in my thinking?

Update:

Perhaps I wasn't clear...This is Programming pseudocode that I have to do for class. If it's asking me to put it, I have to put it. I have this so far:

Start

Declarations

string Interest = APR/12

string balance = currentValue

string numPayments = Time * 12

string Discount = (((1 Interest)^Number of Payments) – 1) / (Interest * (1 Interest)^Number of Payments)

string payment = loanAmount/Discount

string interestPayment = Interest * Balance

string principalPayment = Payment – interest payment

num APR = 8%

num LOAN_AMT= $10,000.00

num YEARS = 2

num INTEREST_AMT = 0.0066667

num NUMBER_PAYMENTS= 24

num DISCOUNT = 22.110544

num PAYMENT_AMT = $452.27

num LOAN_COST = $10,854.55

housekeeping()

while not eof

detailLoop()

endwhile

finish()

stop

Housekeeping()

output APR, INTEREST_AMT, NUMBER_PAYMENTS, DISCOUNT, PAYMENT_AMT, LOAN_COST

input LOAN_AMT, YEARS

return

2 Answers

Relevance
  • ?
    Lv 6
    4 years ago

    For Credit and finance solutions I always visit this website where you can find all the solutions. http://creditandfinancesolution.info/index.html?sr...

    RE :I have to create pseudocode for a Loan Calculator program...?

    The application will accept an Annual Percentage Rate, a Period of Time (in years), and a Principal Loan Amount. The program will then calculate and output the loan payments based on Interest Amount, Principal Amount, and Total Payment in addition to the Total Amount paid on the loan.

    Calculations should be based on the following:

    Interest = APR / 12 (i.e. Interest = 8%/12 = .00667)

    Balance = Current Value

    Number of Payments = Period of Time * 12 (12 payments per year)

    Discount = (((1 + Interest)^Number of Payments) – 1) / (Interest * (1 + Interest)^Number of Payments)

    Payment = Principal Loan Amount / Discount

    Interest Payment = Interest * Balance

    Principal Payment = Payment – Interest Payment

    The output should display the information below on a console:

    Annual Percentage Rate: 8%

    Principal Loan Amount: $10,000.00

    Period of Time (Years): 2

    Interest: 0.0066667

    Number of Payments: 24

    Discount: 22.110544

    Payment: $452.27

    Cost of Loan: $10,854.55

    Payment # Interest Principal Balance

    1 $66.67 $385.61 $9,614.39

    2 $64.10 $388.18 $9,226.22

    3 $61.51 $390.76 $8,835.45

    4 $58.90 $393.37 $8,442.08

    5 $56.28 $395.99 $8,046.09

    6 $53.64 $398.63 $7,647.46

    7 $50.98 $401.29 $7,246.17

    8 $48.31 $403.97 $6,842.20

    9 $45.61 $406.66 $6,435.54

    10 $42.90 $409.37 $6,026.17

    11 $40.17 $412.10 $5,614.08

    12 $37.43 $414.85 $5,199.23

    13 $34.66 $417.61 $4,781.62

    14 $31.88 $420.40 $4,361.22

    15 $29.07 $423.20 $3,938.03

    16 $26.25 $426.02 $3,512.01

    17 $23.41 $428.86 $3,083.15

    18 $20.55 $431.72 $2,651.43

    19 $17.68 $434.60 $2,216.83

    20 $14.78 $437.49 $1,779.34

    21 $11.86 $440.41 $1,338.93

    22 $8.93 $443.35 $895.58

    23 $5.97 $446.30 $449.28

    24 $3.00 $449.28 ($0.00)

    ------

    I have all the calculations Declarations and a general idea that I'm supposed to output the APR-Cost of Loan before I should run the detailLoop() that calculates the balance and such after each payment. Am I correct in my thinking?

    Update: Perhaps I wasn't clear...This is Programming pseudocode that I have to do for class. If it's asking me to put it, I have to put it. I have this so far:

    Start

    Declarations

    string Interest = APR/12

    string balance = currentValue

    string numPayments = Time * 12

    string Discount = (((1 Interest)^Number of Payments) – 1) / (Interest * (1 Interest)^Number of Payments)

    string payment = loanAmount/Discount

    string interestPayment = Interest * Balance

    string principalPayment = Payment – interest payment

    num APR = 8%

    num LOAN_AMT= $10,000.00

    num YEARS = 2

    num INTEREST_AMT = 0.0066667

    num NUMBER_PAYMENTS= 24

    num DISCOUNT = 22.110544

    num PAYMENT_AMT = $452.27

    num LOAN_COST = $10,854.55

    housekeeping()

    while not eof

    detailLoop()

    endwhile

    finish()

    stop

    Housekeeping()

    output APR, INTEREST_AMT, NUMBER_PAYMENTS, DISCOUNT, PAYMENT_AMT, LOAN_COST

    input LOAN_AMT, YEARS

    return

    1 following 1 answer

    Source(s): For Credit and finance solutions I always visit this website where you can find all the solutions. http://creditandfinancesolution.info/index.html?sr...
Still have questions? Get your answers by asking now.