Hi easyb and welcome to DaniWeb
You don't need to use Math.pow at all. Math.pow is used to find the power of a number. I wish that banks would pay interest exponentially but unfortunately...
I suggest you revise your notes on iteration and for-loops. I think what you want would look something like this:
for(n=1; n<=10; n++) {
P = P * (1+r); // a better solution would be to have r = 1.05
System.out.println("The amount at the end of the year " + n + " is:" + P);
}
Reputation Points: 395
Solved Threads: 192
Veteran Poster
Offline 1,136 posts
since Aug 2007