The following formula is used to calculate the fixed


Please apply the following formula below to the program so it works correctly!

The following formula is used to calculate the fixed monthly payment (P) required to fully amortize a loan of L dollars over a term of n months at a monthly interest rate of c. [If the quoted rate is 6%, for example, c is .06/12 or .005].

P = L[c(1 + c)n]/[(1 + c)n - 1]

I am currently getting the following errors

Number found where operator expected at calc.cgi line 38, near "#P = Lr(1+r/1200"

(Might be a runaway multi-line // string starting on line 15)

(Do you need to predeclare P?)

Unquoted string "n" may clash with future reserved word at mor_calc.cgi line 38.

Unquoted string "r" may clash with future reserved word at mor_calc.cgi line 38.

Unquoted string "n" may clash with future reserved word at mor_calc.cgi line 38.

Scalar found where operator expected at mor_calc.cgi line 39, near "$num_months"

(Missing semicolon on previous line?)

syntax error at mor_calc.cgi line 38, near "P = Lr(1+r/1200"

Missing right curly or square bracket at mor_calc.cgi line 61, at end of line

Execution of calc.cgi aborted due to compilation errors.

Write a mortgage calculator PERL(.cgi) program that asks the user for the following information:

1. Loan amount

2. Number of years

3. Percent per year compound interest

Use the following formula to determine the total amount of each payment:

n = months * 12

r = percent per year compound interest

L = loan amount

P = Lr(1+r/1200)^n/[1200{(1+r/1200)^n - 1}]

The program must include a...

1. An array

2. A print function

3. One conditional component

4. One subroutine

Example:

If the loan was $20,000 over 15 years at 12 percent the repayment would be $240.08

Solution Preview :

Prepared by a verified Expert
Programming Languages: The following formula is used to calculate the fixed
Reference No:- TGS01244779

Now Priced at $15 (50% Discount)

Recommended (97%)

Rated (4.9/5)