# VBForums CodeBank > CodeBank - Other >  [TI-83] Compound and Simple Interest

## penagate

4 programs for computing interest, both compound and simple. All are needed to run.



```
INTEREST

Menu("METHOD","COMPOUND",A,"SIMPLE",B)
Lbl A
prgmCNPNDINT
Stop
Lbl B
prgmSMPINTRS
Stop
```



```
CNPNDINT

ClrHome
Disp "COMPOUND"
Disp "INTEREST"
Input "PRINCIPAL?",P
Input "RATE?",I
1->M
1->C
prgmCPTINTRS
```



```
SMPINTRS

ClrHome
Disp "SIMPLE INTEREST"
Input "PRINCIPAL?",P
Input "RATE?",I
2->M
1->C
prgmCPTINTRS
```



```
CPTINTRS

Lbl T
If C=1
Then
Input "NO. PERIODS?",N
0->C
Else
Input "NEW NO. PERIODS?",N
End
If N=0
Then
Stop
End
If M=1
Then
(P(I)^N)->A
ClrHome
Disp "VALUE=",A
If (A-P)<0
Then
Disp "TOTAL DEC.:",(P-A)
Disp "DEPRICIATION:"
Else
Disp "TOTAL INC.:",(A-P)
Disp "APPRECIATION:"
End
(A-(P(I)^(N-1)))->B
If (N-1)<=0
Then
Disp "            NONE"
Else
Disp B
End
Else
If M=2
Then
PNI->A
Disp "VALUE:",A
If A>P
Then
Disp "TOTAL INC.:",(A-P)
Else
If A=P
Then
Disp "NO GAIN"
Else
Disp "TOTAL DEC.:",(P-A)
Goto T
```

----------

