# Vb.net project for interest calc • ### Question

• I am on one vb project but I have failed to build because of some error. Program interface will be Num1 Num2 Num3
Num1= principle amount
Num1= installment number
Num3 = rate of interest
Suppose Num1 = 6000
num2 = 6
Num3 = 6%
I need answer should be like this as follows:
1. 6000x1x6% = 360
2. 6000x2x6% = 720
3. 6000x3x6% = 1080
4. 6000x4x6% = 1440
5. 6000x5x6% = 1800
6. 6000x6x6% = 2160
In total interest will be 7560
Here Principle amount and Rate and installment number different as user wishes. So how to make a project code?
Sunday, October 9, 2016 2:54 PM

• Okay thank you for your great response...

I knowledge about the code.. I used for next loop and succeeded.

```Dim Nyear,i,mat as decimal
For i=N to Nyear
Mat+=(formula)```
It gives excactly what I want..

• Marked as answer by Tuesday, October 11, 2016 1:31 PM
Tuesday, October 11, 2016 1:31 PM

### All replies

• Hi,

first of all: This is the Training and Certification forum - so questions regarding Microsoft Traiings or Certifications are on topic here.

If you have problems with VB.net, then I would suggest to use the VB.Net Forum instead.

a) Please show the code that you wrote so far. And give us the error destails ("some error" does not help us at all to help you).

b) We will not develop solutions for you - we will only help you so that you can build the solution in the end.

c) Your logic is simply wrong. Interest of multiple years is not just a multiply of the money. Just imagine, that you have 10% interest and 6000\$: After one year, you will get 10% interest so you have 6600\$. In the second year, you will not get 600\$! You will get 660\$ because you get 10% of 6600\$!

So if you have sum and you want to add i% interest for y years, then the result (of the total that you own after the years) is
sum * (1 + i/100) ^ y
Or if you just want to get the interest, then you have to substrate sum: sum * (1+i/100)^y - sum

I hope that helped a little bit.

With kind regards,

Sunday, October 9, 2016 5:15 PM
• Okay thank you for your great response...

I knowledge about the code.. I used for next loop and succeeded.

```Dim Nyear,i,mat as decimal
For i=N to Nyear
Mat+=(formula)```
It gives excactly what I want..

• Marked as answer by Tuesday, October 11, 2016 1:31 PM
Tuesday, October 11, 2016 1:31 PM
• Hi,

first of all: This is the Training and Certification forum - so questions regarding Microsoft Traiings or Certifications are on topic here.

If you have problems with VB.net, then I would suggest to use the VB.Net Forum instead.

a) Please show the code that you wrote so far. And give us the error destails ("some error" does not help us at all to help you).

b) We will not develop solutions for you - we will only help you so that you can build the solution in the end.

c) Your logic is simply wrong. Interest of multiple years is not just a multiply of the money. Just imagine, that you have 10% interest and 6000\$: After one year, you will get 10% interest so you have 6600\$. In the second year, you will not get 600\$! You will get 660\$ because you get 10% of 6600\$!

So if you have sum and you want to add i% interest for y years, then the result (of the total that you own after the years) is
sum * (1 + i/100) ^ y
Or if you just want to get the interest, then you have to substrate sum: sum * (1+i/100)^y - sum

I hope that helped a little bit.

With kind regards,