FV=Investment*(1+Interest )years
Also,design a splash screen for this application.Use appropriate controls to design the user interface.
A) Program Design :
( Design & Code for Splash Screen didn't give)
(B) Property(Controls Used) :
- 4 Labels and their CAPTIONS are Investment Amount(Rs.),nvestment Period(Years),Interest Rate and Future Value is .
- One Command Button and its CAPTION is Calculate Future Value.
- 4 Text Boxes
(C) Attaching Code to the Object :
Private Sub Command1_Click() |
Dim investment As Single Dim rate As Single Dim years As Integer Dim FV As Single investment = Val(Text1.Text) rate = Val(Text3.Text) years = Val(Text2.Text) FV = investment * power((1 + rate / 100), years) Text4.Text = FV End Sub |
Private Function power(base As Double, raise As Integer) As Double power = 1 For i = 1 To raise power = power * base Next End Function |
- ====================================================================
===========================================================
No comments:
Post a Comment