Thursday 30 August 2012

VB Program - To Calculate the Simple Interest


VB Program - To Calculate the Simple Interest

Program :

Sub SimpleInterest()

Dim varPA
Dim varT
Dim varROI
Dim varSI
varPA = InputBox("Enter Principle Amount")
varT = InputBox("Enter Time(Yrs)")
varROI = InputBox("Enter Rate of Interest")
varSI = (varPA * varT * varROI) / 100
MsgBox "Simple Interest is " + CStr(varSI)
'Cstr()- Function converts the value to String

End Sub

1 comment: