I'm having trouble repeating the code for different a set of years for each different percentage rate. I'm not sure what I'm doing wrong. I'm very new at this and I'm sorry if this is very simple question. Please let me know if you need more information from me.

( This is the code I'm using. )

public class Interest { public static void main( String [] args ) { double amount; // amount on deposit at the end of each year double principal = 1000.0; // initial amount before interest // display headers System.out.printf( "%s%20s\n", "Year", "Amount on deposit" ); // calculate amount on deposit for each of ten years for ( int year = 1; year <=10; year++ ) for ( double rate = .05; rate <=.10; rate ++ ) { { // calculate new amount for each specified year amount = principal * Math.pow( 1.0 + rate, year ); // display the year and the amount System.out.printf( "%4d%,20.2f\n", year, amount ); } //end for } // end for } // end main } // end class Interest

( This is the result I'm getting for just the interest rate of 5%. I'm looking to show a different set of years for each percentage rate from 5%-10%. )

C:\Users\Anthony\Documents\CSC 130>java Interest

Year Amount on deposit

1 1,050.00

2 1,102.50

3 1,157.63

4 1,215.51

5 1,276.28

6 1,340.10

7 1,407.10

8 1,477.46

9 1,551.33

10 1,628.89