Calculating Compound Interest

Blitz3D Forums/Blitz3D Programming/Calculating Compound Interest

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

So this is wht you are looking for?
Graphics 800,600
Global i
Global t
Global r#
Global p
Global p2

p=100000
r#=.06 ; note 6 percent for a house
t=15

CalcCompoundInterest(p,r#,t)
mos=t*12
month=p2/mos
Text 0,0,"Principal: "+ p
Text 0,15,"RATE: "+ r# + " %"
Text 0,30,"TERM (YRS): "+ t
Text 0,45,"Interest: "+i
Text 0,60,"P + Int: "+p2
Text 0,85,"Monthly Pay: "+month
WaitKey
End 


;Calculates Compound Interest
;principal, rate, time
Function CalcCompoundInterest(p,r#,t)
	
	r# = r#	
	For a = 0 To t
		i = p*r#
		p2 = p + i
	Next
Return i And p2

End Function

Interesting... my wifes an accountant she does this in a different way... :)
RZ