I would like to do the following formula in Small Basic

**P = C (1 + r/n)<sup> nt</sup>**

where

P = future value

C = initial deposit

r = interest rate (expressed as a fraction: eg. 0.06)

n = # of times per year interest in compounded

t = number of years invested

I wrote the followin but it does not seem to work.

- 'Compund Interest Calculator

TextWindow.Title = ("Compound Interest Calculator")

' initialize variables

c = 0

R = 0

N = 0

T = 0

' ask what the Initial Deposit is

TextWindow.Write("What is your initial Deposit")

C = TextWindow.Read()

'Ask the interest rate

TextWindow.Write("What is your interest rate? Expressed as a Fraction EG 0.06 for six percent.")

r = TextWindow.Read()

'Ask how many times a year interest is charged

TextWindow.Write("How many times a year is interest charged?")

n = TextWindow.Read()

'For how many years is the funds invested

TextWindow.Write("For how many years is the finds invested")

t = TextWindow.Read()

P = C*( 1 + )(r / n))Math.Power(n*t)

Any help would be appreciated.