k-b0101's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
2 (0 per day)
Joined:
08-November 11
Profile Views:
120
Last Active:
User is offline Dec 04 2011 06:18 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   k-b0101 has not set their status

Posts I've Made

  1. In Topic: Investment value Calculator-future value is not correct

    Posted 18 Nov 2011

    View Postg00se, on 18 November 2011 - 06:20 PM, said:

    Quote

    double res = invest * Math.pow((1 + interestrt), (year * 12));
    


    Firstly, if you're entering the interest rate as a percent, e.g. 3.25, then it should be

    interestrt/100

    and it's not 'year * 12' but just 'year'


                double futureValue = invest * Math.pow(1 + (interestrt/100), year);
                txtRes.setText(String.format("%,.2f", futureValue));
    
    

    Ok thank you for the help. That is exactly the fix I needed. So by doing inerestrt/100 is made interest rate a %,
    and the "%,.2f" gave it the correct decimal place right?

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

k-b0101 hasn't added any friends yet.

Comments

k-b0101 has no profile comments yet. Why not say hello?