Hello.
i am in need of to calculate following program kindly help me to do.
my project is:
for ex,
april month deposit - 300 (int 9%)
interest - 2.25
may month deposit - 300
existing amount(apr) - 300
total - 600 (9%)
interest - 4.5
sum of int (2.25+4.5) should display in text box. friends i should calculate intrest like this for 12 months
.
.
my coding is:
int cumu = Convert.ToInt32(textBox3.Text.Trim());
int totdep = Convert.ToInt32(textBox4.Text.Trim());
decimal tot = cumu + totdep;
textBox4.Text = Convert.ToString(tot);
//Decimal subyearly = Convert.ToDecimal(textBox5.Text.Trim());
decimal cumuint = ((tot * 10) / 100)/12;
textBox5.Text = Convert.ToString(cumuint);
actually received amount is textbox3. in textbox4 holds total received in that textbox4 calculating interest. the interest amount will display in textbox5.
my needs are the sum of interest amount should calculate and display in textbox6
how to calculate cumulative interest and the sum of interest should display textbox in c#.net back end is oracle
Thank you in advance..
VulpesPosted Mar 1, 2011, 5:21 PM
VulpesPosted Mar 1, 2011, 3:54 PM
int cumu = Convert.ToInt32(textBox3.Text.Trim()); // cumulative deposits before new deposit added
int dep = Convert.ToInt32(textBox4.Text.Trim()); // new monthly deposit (no interest earned yet)
decimal tot = cumu + dep; // total deposits to date
textBox4.Text = Convert.ToString(tot);
decimal cumuint = cumu * 9m/ 1200m; // interest for a month at 9% on cumulative deposits before new one
textBox5.Text = Convert.ToString(cumuint);
decimal totint = Convert.ToDecimal(textBox6.Text.Trim()); // total interest before new interest added
totint += cumuint;
textBox6.Text = Convert.ToString(totint); // total interest to date
LOGANATHAN VPosted Mar 2, 2011, 6:35 AM
VulpesPosted Mar 2, 2011, 5:35 AM
I guess that would make sense if the deposit is always paid at the beginning of each month but interest is calculated at the end of each month. So, I'd therefore incorporate the amendment in my previous post into your code.
LOGANATHAN VPosted Mar 2, 2011, 12:26 AM
LOGANATHAN VPosted Mar 1, 2011, 4:22 PM