! The present value p of an amount a produced by compounding interest

! annually for n year at a percentage interest rate of i is given by

! p=a/(1+i/100)^n. Ask a user to enter the amount of money in dollars,

! the interest rate in percent, and the number of years.

! Display the present value of this amount.

! Use the print using statement to display dollar amounts to the

! nearest cent. The screen should display the following input and output:

! Amount? 1000

! Interest in percent? 11.5

! Number of years? 123

! Present value is 2708.33

! Test your program using data in the following table:

! Amount Interest Years

! 10,000 11.5% 12

! 5,000 8.3% 9

 

INPUT prompt "Amount? (10000) ":a

INPUT prompt "Interest in percent? (11.5) ":i

INPUT prompt "Number of years? (12) ":n

LET d=(1+(i/100))^n

LET p=a/d

PRINT "Present value is ";

PRINT using "#####.##": p

END