class d120114_2{
public static void main(String args[]){
double r=0.05;
int p = 1000;
int n = 10;
int m1,m2;
System.out.println("年 A銀行(複利) B銀行(單利)\n----------------------------------------");
for(int i = 1; i <= n ; i++){
m1 = (int)(p * Math.pow( (1+r) , i ));
m2 = (int)(p * ( 1 + r*i ));
System.out.printf("%d\t%d\t\t%d\n",i,m1,m2);
}
System.out.println("----------------------------------------");
}
}
class d120114_2{
public static void main(String args[]){
double r=0.05;
int p = 1000;
int n = 10;
int m1,m2;
System.out.println("年 A銀行(複利) B銀行(單利)\n----------------------------------------");
for(int i = 1; i <= n ; i++){
m1 = (int)(p * Math.pow( (1+r) , i ));
m2 = (int)(p * ( 1 + r*i ));
System.out.printf("%d\t%d\t\t%d\n",i,m1,m2);
}
System.out.println("----------------------------------------");
}
}