網頁

2014年3月4日 星期二

Java作業4循環複利

設定存款年息(例如 0.02, 即 2%), 然後用程式計算和顯示存款45萬元和500萬元時,10、20、30、40、50、60年後的循環複利本利和。

Hint: A=P*Math.exp(r*x)

39 則留言:

  1. b102533070劉思涵2014年3月4日 上午10:49

    public static void main(String[] args) {
    for (int i = 10; i <=60; i+=10) {
    double y =450000* Math.exp(i*0.02);
    System.out.println(i+"-->exp("+i+")="+y);
    }
    }
    }
    10-->exp(10)=549631.2411720764
    20-->exp(20)=671321.1139385717
    30-->exp(30)=819953.460175729
    40-->exp(40)=1001493.4178216106
    50-->exp(50)=1223226.8228065702
    60-->exp(60)=1494052.6152314462

    public static void main(String[] args) {
    for (int i = 10; i <=60; i+=10) {
    double y =5000000* Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+y);
    }
    }
    }
    10年後本利和6107013.790800849
    20年後本利和7459123.488206352
    30年後本利和9110594.001952544
    40年後本利和1.112770464246234E7
    50年後本利和1.3591409142295225E7
    60年後本利和1.6600584613682736E7

    回覆刪除
  2. B10233072黃君寰2014年3月4日 上午10:51

    public static void main(String[] args) {
    System.out.println("循環利息");
    for (int i = 10; i < 60; i+=10) {
    double y=450000*Math.exp(i*0.02);
    System.out.println(i+"年本利合="+y);

    }
    }

    }

    循環利息
    10年本利合=549631.2411720764
    20年本利合=671321.1139385717
    30年本利合=819953.460175729
    40年本利合=1001493.4178216106
    50年本利合=1223226.8228065702

    public static void main(String[] args) {
    System.out.println("循環利息");
    for (int i = 10; i < 60; i+=10) {
    double y=500000*Math.exp(i*0.02);
    System.out.println(i+"年本利合="+y);

    }
    }

    }

    循環利息
    10年本利合=610701.379080085
    20年本利合=745912.3488206351
    30年本利合=911059.4001952545
    40年本利合=1112770.464246234
    50年本利合=1359140.9142295225

    回覆刪除
  3. B10233064莊英霆2014年3月4日 上午10:52

    public class Hi {

    public static void main(String[] args) {
    System.out.println(&quot;四十五萬&quot;);
    for (int i = 10; i &lt;=60; i+=10) {
    double y =450000*Math.exp(i*0.02);
    System.out.println(i+&quot;年後本利和&quot;+y);
    }

    System.out.println(&quot;五百萬&quot;);
    for (int x = 10; x &lt;=60; x+=10) {
    double z =5000000*Math.exp(x*0.02);
    System.out.println(x+&quot;年後本利和&quot;+z);
    }
    }
    }





    四十五萬
    10年後本利和549631.2411720764
    20年後本利和671321.1139385717
    30年後本利和819953.460175729
    40年後本利和1001493.4178216106
    50年後本利和1223226.8228065702
    60年後本利和1494052.6152314462
    五百萬
    10年後本利和6107013.790800849
    20年後本利和7459123.488206352
    30年後本利和9110594.001952544
    40年後本利和1.112770464246234E7
    50年後本利和1.3591409142295225E7
    60年後本利和1.6600584613682736E7

    回覆刪除
  4. B10233061 吳興強2014年3月4日 上午10:53


    public class java {

    public static void main(String[] args) {
    //存款為45萬時
    System.out.println("存款為45萬時");
    for(int i=10;i<=60;i+=10){
    double y=450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+y);
    }

    //存款為500時


    System.out.println("存款為500萬時");
    for(int k=10;k<=60;k+=10){
    double j=5000000*Math.exp(k*0.02);
    System.out.println(k+"年後本利和"+j);


    }

    }

    }



    存款為45萬時
    10年後本利和549631.2411720764
    20年後本利和671321.1139385717
    30年後本利和819953.460175729
    40年後本利和1001493.4178216106
    50年後本利和1223226.8228065702
    60年後本利和1494052.6152314462
    存款為500萬時
    10年後本利和6107013.790800849
    20年後本利和7459123.488206352
    30年後本利和9110594.001952544
    40年後本利和1.112770464246234E7
    50年後本利和1.3591409142295225E7
    60年後本利和1.6600584613682736E7





    回覆刪除
  5. public static void main(String[] args) {
    System.out.println("45萬年利率");
    for (int i = 10; i < 60; i+=10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }
    System.out.println("--------------------------------\n500萬年利率");
    for (int i = 10; i < 60; i+=10) {
    double x = 5000000 * Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+x);
    }
    }
    }

    回覆刪除
  6. package hello;

    public class hello0304 {

    public static void main(String[] args) {
    System.out.println("45萬本利合");
    for (int i = 10; i <=60 ; i+=10) {
    double y =450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利合="+y);
    }
    System.out.println("500萬本利合");
    for (int j = 10; j <=60 ; j+=10) {
    double r =5000000*Math.exp(j*0.02);
    System.out.println(j+"年後本利合="+r);
    }
    }
    }

    回覆刪除
  7. package fff;

    public class vvv {

    public static void main(String[] args) {
    System.out.println("450000本利和");
    for (int i = 10; i <= 60; i+=10){
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+y);
    }
    System.out.println("5000000本利和");
    for(int j =10;j <=60; j+=10){
    double k = 5000000*Math.exp(j*0.02);
    System.out.println(j+"年後本利和"+k);
    }

    }

    }

    回覆刪除
  8. package hello;

    public class hello {

    public static void main(String[] args) {
    // TODO Auto-generated method stub
    System.out.println("45萬");
    for (int i = 10; i<=60;i+=10){
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);

    }
    System.out.println("500萬");
    for (int k = 10; k<=60;k+=10){
    double j = 450000*Math.exp(k*0.02);
    System.out.println(k+"年後本利和="+j);
    }
    }
    }

    回覆刪除
  9. B10233062 ;黃聖評2014年3月4日 上午10:57

    package she;

    public class she {

    public static void main(String[] args) {
    System.out.println("45萬循環複利");
    for (int i = 10; i <=60; i+=10) {
    double y = 450000 * Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+y);
    }
    System.out.println("\n500萬循環複利");
    for (int i = 10; i <=60; i+=10) {
    double d = 5000000 * Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+d);

    }
    }

    }


    45萬循環複利
    10年後本利和549631.2411720764
    20年後本利和671321.1139385717
    30年後本利和819953.460175729
    40年後本利和1001493.4178216106
    50年後本利和1223226.8228065702
    60年後本利和1494052.6152314462

    500萬循環複利
    10年後本利和6107013.790800849
    20年後本利和7459123.488206352
    30年後本利和9110594.001952544
    40年後本利和1.112770464246234E7
    50年後本利和1.3591409142295225E7
    60年後本利和1.6600584613682736E7

    回覆刪除
  10. package hello;
    public class hello0304 {
    public static void main(String[] args) {
    System.out.println("450000本利和");
    for(int i=10;i<=60;i+=10){
    double y=450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }
    System.out.println("\n5000000本利和");
    for(int j=10;j<=60;j+=10){
    double t=5000000*Math.exp(j*0.02);
    System.out.println(j+"年後本利和="+t);
    }
    }
    }


    450000本利和
    10年後本利和=549631.2411720764
    20年後本利和=671321.1139385717
    30年後本利和=819953.460175729
    40年後本利和=1001493.4178216106
    50年後本利和=1223226.8228065702
    60年後本利和=1494052.6152314462

    5000000本利和
    10年後本利和=6107013.790800849
    20年後本利和=7459123.488206352
    30年後本利和=9110594.001952544
    40年後本利和=1.112770464246234E7
    50年後本利和=1.3591409142295225E7
    60年後本利和=1.6600584613682736E7

    回覆刪除
  11. package hello;
    public class hello0304 {
    public static void main(String[] args) {
    System.out.println("450000本利合");
    for (int i = 10 ; i <= 60 ; i+=10){
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利合="+y);
    }
    System.out.println("\n5000000本利合");
    for (int j = 10 ; j <= 60 ; j+=10){
    double t = 5000000*Math.exp(j*0.02);
    System.out.println(j+"年後本利合="+t);
    }
    }
    }


    450000本利合
    10年後本利合=549631.2411720764
    20年後本利合=671321.1139385717
    30年後本利合=819953.460175729
    40年後本利合=1001493.4178216106
    50年後本利合=1223226.8228065702
    60年後本利合=1494052.6152314462

    5000000本利合
    10年後本利合=6107013.790800849
    20年後本利合=7459123.488206352
    30年後本利合=9110594.001952544
    40年後本利合=1.112770464246234E7
    50年後本利合=1.3591409142295225E7
    60年後本利合=1.6600584613682736E7

    回覆刪除
  12. b10233080 陳芊慈2014年3月4日 上午10:59

    public class qq {

    public static void main(String[] args) {
    System.out.println(5000000);
    for (int i = 10; i <= 60; i+=10) {
    double y = 5000000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);

    }
    }
    }





    public class qq {

    public static void main(String[] args) {
    System.out.println(5000000);
    for (int i = 10; i <= 60; i+=10) {
    double y = 4500000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);

    }
    }
    }

    回覆刪除
  13. package hhhggg;

    public class yjrjrj {

    public static void main(String[] args) {
    System.out.println("450000本利和");
    for (int i = 10; i <=60; i+=10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+y);
    }
    System.out.println("------------------------------\n5000000本利和");
    for (int j=10;j<=60;j+=10){
    double k =5000000*Math.exp(j*0.02);
    System.out.println(j+"年後本利和"+k);
    }

    }

    }

    回覆刪除
  14. B10233098 陳孟緣2014年3月4日 上午11:00

    public class aaa {

    public static void main(String[] args) {
    System.out.println(5000000);
    for (int i=10 ; i <=60;i+=10) {
    double y =5000000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }
    }
    }









    public class aaa {

    public static void main(String[] args) {
    System.out.println(5000000);
    for (int i=10 ; i <=60;i+=10) {
    double y =4500000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }
    }
    }

    回覆刪除
  15. package hello;

    public class qwe {

    public static void main(String[] args) {
    System.out.println("利率");
    for (int i = 10; i <= 60; i+=10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }

    System.out.println("利率");
    for (int x = 10; x <= 60; x+=10) {
    double z = 500000*Math.exp(x*0.02);
    System.out.println(x+"年後本利和="+z);
    }
    }
    }

    回覆刪除
  16. B10233097 邱宥甄2014年3月4日 上午11:02


    public class aaa {

    public static void main(String[] args) {
    System.out.println(5000000);
    for (int i=10 ; i <=60;i+=10) {
    double y =5000000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }
    }
    }





    public class aaa {

    public static void main(String[] args) {
    System.out.println(5000000);
    for (int i=10 ; i <=60;i+=10) {
    double y =4500000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }
    }
    }

    回覆刪除
  17. B10233082 唐偉強2014年3月4日 上午11:02

    package hkhjk;

    public class jkjlmk {

    public static void main(String[] args) {
    System.out.println("45萬元,10、20、30、40、50、60年後的循環複利本利和 ");
    for (int i = 10; i <= 60; i+=10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }

    System.out.println("500萬元,10、20、30、40、50、60年後的循環複利本利和 ");
    for (int x = 10; x <= 60; x+=10) {
    double z = 5000000*Math.exp(x*0.02);
    System.out.println(x+"年後本利和="+z);
    }

    }

    }

    回覆刪除
  18. b10233106 葉作暐2014年3月4日 上午11:03

    package hello;

    public class test {

    public static void main(String[] args) {
    System.out.println("存款為45萬時");
    for (int i = 10; i <=60;i+=10) {
    double y = 450000*Math.exp(i+0.02);
    System.out.println(i+"年後本利和"+y);
    }

    System.out.println("存款為500萬時");
    for (int k = 10; k <=60;k+=10) {
    double j = 450000*Math.exp(k+0.02);
    System.out.println(k+"年後本利和"+j);
    }

    }

    }

    回覆刪除
  19. package hello;

    public class hello0304 {

    public static void main(String[] args) {
    System.out.println(&quot;45萬本利合&quot;);
    for (int i = 10; i &lt;=60 ; i+=10) {
    double y =450000*Math.exp(i*0.02);
    System.out.println(i+&quot;年後本利合=&quot;+y);
    }
    System.out.println(&quot;500萬本利合&quot;);
    for (int j = 10; j &lt;=60 ; j+=10) {
    double r =5000000*Math.exp(j*0.02);
    System.out.println(j+&quot;年後本利合=&quot;+r);
    }
    }
    }

    45萬本利合
    10年後本利合=549631.2411720764
    20年後本利合=671321.1139385717
    30年後本利合=819953.460175729
    40年後本利合=1001493.4178216106
    50年後本利合=1223226.8228065702
    60年後本利合=1494052.6152314462
    500萬本利合
    10年後本利合=6107013.790800849
    20年後本利合=7459123.488206352
    30年後本利合=9110594.001952544
    40年後本利合=1.112770464246234E7
    50年後本利合=1.3591409142295225E7
    60年後本利合=1.6600584613682736E7

    回覆刪除
  20. B10233108 林宣瑋2014年3月4日 上午11:03

    package laolin;

    public class laolin {

    public static void main(String[] args){
    System.out.println("45萬複利計算");
    for (int i=10;i<=60;i+=10){
    double y=450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }
    System.out.println("\n500萬複利計算");
    for (int j = 10; j <=60; j+=10) {
    double z = 5000000 * Math.exp(j * 0.02);
    System.out.println(j+"年後本利和="+z);
    }
    }
    }

    回覆刪除
  21. B10233069連于傑2014年3月4日 上午11:03

    package hello304;

    public class rate {

    public static void main(String[] args) {
    System.out.println("甲公司");
    for (int i = 10; i <= 60; i += 10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i + "年後本利和=" + y);
    }



    System.out.println("乙公司");
    for (int x = 10; x <= 60; x += 10) {
    double z = 5000000*Math.exp(x*0.02);
    System.out.println(x + "年後本利和=" + z);
    }

    }
    }

    回覆刪除
  22. Y10211027張君弘2014年3月4日 上午11:03

    package hello0304;

    public class test0304 {

    public static void main(String[] args) {
    System.out.println("45萬的複利計算");
    for (int i = 10; i <=60; i+=10) {
    // TODO Auto-generated method stub
    double y=450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }
    System.out.println("\n500萬的複利計算");
    for (int j = 10; j <=60; j+=10) {
    double k = 5000000 * Math.exp(j * 0.02);
    System.out.println(j+"年後本利和="+k);
    }
    }
    }

    回覆刪除
  23. B10233087 黃少洋2014年3月4日 上午11:04

    package hello;

    public class helol {

    public static void main(String[] args) {
    // TODO 自動產生的方法 Stub
    System.out.println("45萬複利");
    for (int i = 10; i <= 60 ; i+=10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }
    System.out.println("500萬複利");
    for (int i = 10; i <= 60 ; i+=10) {
    double d = 5000000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+d);
    }
    }
    }

    回覆刪除
  24. B10233107蔡育霖2014年3月4日 上午11:04

    package hellow0304;

    public class text {
    public static void main (String[] args) {
    System.out.println("健行智障率");
    for (int i = 10; i <= 60; i+=10) {
    double y = 4500000*Math.exp(i*0.02);
    System.out.println(i+"年/個="+y);
    }
    System.out.println("\n世界智障率");
    for (int i = 10; i <= 60; i+=10) {
    double y = 5000000*Math.exp(i*0.02);
    System.out.println(i+"年/個="+y);


    }
    }
    }

    回覆刪除
  25. B10233063 張宜禎2014年3月4日 上午11:05

    public class Hi {
    public static void main(String[] args) {
    System.out.println(&amp;quot;四十五萬&amp;quot;);
    for (int i = 10; i &amp;lt;=60; i+=10) {
    double y =450000*Math.exp(i*0.02);
    System.out.println(i+&amp;quot;年後本利和&amp;quot;+y);
    }
    System.out.println(&amp;quot;五百萬&amp;quot;);
    for (int x = 10; x &amp;lt;=60; x+=10) {
    double z =5000000*Math.exp(x*0.02);
    System.out.println(x+&amp;quot;年後本利和&amp;quot;+z);
    }
    }
    }
    四十五萬
    10年後本利和549631.2411720764
    20年後本利和671321.1139385717
    30年後本利和819953.460175729
    40年後本利和1001493.4178216106
    50年後本利和1223226.8228065702
    60年後本利和1494052.6152314462
    五百萬
    10年後本利和6107013.790800849
    20年後本利和7459123.488206352
    30年後本利和9110594.001952544
    40年後本利和1.112770464246234E7
    50年後本利和1.3591409142295225E7
    60年後本利和1.6600584613682736E7

    回覆刪除
  26. package exp;

    public class exp {

    public static void main(String[] args) {
    System.out.println("利率");
    for (int i =10; i <=60; i+=10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }



    System.out.println("利率");
    for (int x =10; x <=60; x+=10) {
    double z = 5000000*Math.exp(x*0.02);
    System.out.println(x+"年後本利和="+z);
    }
    }
    }

    回覆刪除
  27. Y10211064 黃耀葦2014年3月4日 上午11:05

    package hello;

    public class helol {

    public static void main(String[] args) {
    // TODO 自動產生的方法 Stub
    System.out.println("45萬循環");
    for (int i = 10; i <= 60 ; i+=10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }
    System.out.println("500萬循環");
    for (int i = 10; i <= 60 ; i+=10) {
    double d = 5000000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+d);
    }
    }
    }

    回覆刪除
  28. B10233084 陳億如2014年3月4日 上午11:06

    public class Hi {

    public static void main(String[] args) {
    System.out.println(&amp;quot;四十五萬&amp;quot;);
    for (int i = 10; i &amp;lt;=60; i+=10) {
    double y =450000*Math.exp(i*0.02);
    System.out.println(i+&amp;quot;年後本利和&amp;quot;+y);
    }

    System.out.println(&amp;quot;五百萬&amp;quot;);
    for (int x = 10; x &amp;lt;=60; x+=10) {
    double z =5000000*Math.exp(x*0.02);
    System.out.println(x+&amp;quot;年後本利和&amp;quot;+z);
    }
    }
    }





    四十五萬
    10年後本利和549631.2411720764
    20年後本利和671321.1139385717
    30年後本利和819953.460175729
    40年後本利和1001493.4178216106
    50年後本利和1223226.8228065702
    60年後本利和1494052.6152314462
    五百萬
    10年後本利和6107013.790800849
    20年後本利和7459123.488206352
    30年後本利和9110594.001952544
    40年後本利和1.112770464246234E7
    50年後本利和1.3591409142295225E7
    60年後本利和1.6600584613682736E7

    回覆刪除
  29. package hello;

    public class hello0304 {

    public static void main(String [] args){
    System.out.println("aasdfgdy");
    for (int i = 10; i <= 60; i += 10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i + "-->exp(" + i + ")=" + y);
    }

    System.out.println("assdfgdy");
    for (int x = 10; x <=60; x += 10) {
    double z = 5000000*Math.exp(x*0.02);
    System.out.println(x +"年度本利和=" + z);
    }
    }
    }

    回覆刪除
  30. package hello;

    public class hello0304 {

    public static void main(String[] args){
    System.out.println("aasdfgdy");
    for (int i = 10; i <=60; i += 10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i +"年後本利和=" + y);
    }

    System.out.println("aasdfgdy");
    for (int x = 10; x <=60; x += 10) {
    double z = 5000000*Math.exp(x*0.02);
    System.out.println(x +"年後本利和=" + z);
    }
    }
    }

    回覆刪除
  31. package hello;

    public class hello123 {

    public static void main(String[] args) {
    System.out.println("aasdfgdy");
    for (int i = 10; i <= 60; i+=10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }

    }

    }

    回覆刪除
  32. B10233066張哲毓2014年3月4日 上午11:08

    package 665;

    public class 665 {

    public static void main(String[] args){
    System.out.println("45萬複利計算");
    for (int i=10;i<=60;i+=10){
    double y=450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }
    System.out.println("\n500萬複利計算");
    for (int j = 10; j <=60; j+=10) {
    double z = 5000000 * Math.exp(j * 0.02);
    System.out.println(j+"年後本利和="+z);
    }
    }
    }

    回覆刪除
  33. package hello;

    public class hello0304 {

    public static void main(String[] args){
    System.out.println("A公司");
    for (int i = 10; i <=60; i += 10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i +"年後本利和=" + y);
    }

    System.out.println("B公司");
    for (int x = 10; x <=60; x += 10) {
    double z = 5000000*Math.exp(x*0.02);
    System.out.println(x +"年後本利和=" + z);
    }
    }
    }

    回覆刪除
  34. package HOLLE;

    public class SKILL {

    public static void main(String[] args) {
    System.out.println("45萬元,10、20、30、40、50、60年後的循環複利本利和 ");
    for (int i = 10; i <= 60; i+=10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }

    System.out.println("500萬元,10、20、30、40、50、60年後的循環複利本利和 ");
    for (int x = 10; x <= 60; x+=10) {
    double z = 5000000*Math.exp(x*0.02);
    System.out.println(x+"年後本利和="+z);
    }

    }

    }

    回覆刪除
  35. package HOLLE;

    public class SKILL {

    public static void main(String[] args) {
    System.out.println("45萬元,10、20、30、40、50、60年後的循環複利本利和 ");
    for (int i = 10; i <= 60; i+=10) {
    double y = 450000*Math.exp(i*0.02);
    System.out.println(i+"年後本利和="+y);
    }

    System.out.println("500萬元,10、20、30、40、50、60年後的循環複利本利和 ");
    for (int x = 10; x <= 60; x+=10) {
    double z = 5000000*Math.exp(x*0.02);
    System.out.println(x+"年後本利和="+z);
    }

    }

    }

    回覆刪除
  36. public static void main(String[] args) {
    for (int i = 10; i <=60; i+=10) {
    double y =450000* Math.exp(i*0.02);
    System.out.println(i+"-->exp("+i+")="+y);
    }
    }
    }
    10-->exp(10)=549631.2411720764
    20-->exp(20)=671321.1139385717
    30-->exp(30)=819953.460175729
    40-->exp(40)=1001493.4178216106
    50-->exp(50)=1223226.8228065702
    60-->exp(60)=1494052.6152314462

    public static void main(String[] args) {
    for (int i = 10; i <=60; i+=10) {
    double y =5000000* Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+y);
    }
    }
    }
    10年後本利和6107013.790800849
    20年後本利和7459123.488206352
    30年後本利和9110594.001952544
    40年後本利和1.112770464246234E7
    50年後本利和1.3591409142295225E7
    60年後本利和1.6600584613682736E7

    回覆刪除
  37. package she;

    public class she {

    public static void main(String[] args) {
    System.out.println("45萬循環複利");
    for (int i = 10; i <=60; i+=10) {
    double y = 450000 * Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+y);
    }
    System.out.println("\n500萬循環複利");
    for (int i = 10; i <=60; i+=10) {
    double d = 5000000 * Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+d);

    }
    }

    }


    45萬循環複利
    10年後本利和549631.2411720764
    20年後本利和671321.1139385717
    30年後本利和819953.460175729
    40年後本利和1001493.4178216106
    50年後本利和1223226.8228065702
    60年後本利和1494052.6152314462

    500萬循環複利
    10年後本利和6107013.790800849
    20年後本利和7459123.488206352
    30年後本利和9110594.001952544
    40年後本利和1.112770464246234E7
    50年後本利和1.3591409142295225E7
    60年後本利和1.6600584613682736E7

    回覆刪除
  38. B10233073 楊博宇2014年6月10日 上午10:56

    package rgr;

    public class rgr {

    public static void main(String[] args) {
    System.out.println("45萬循環複利");
    for (int i = 10; i <=60; i+=10) {
    double y = 450000 * Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+y);
    }
    System.out.println("\n500萬循環複利");
    for (int i = 10; i <=60; i+=10) {
    double d = 5000000 * Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+d);

    }
    }

    }


    45萬循環複利
    10年後本利和549631.2411720764
    20年後本利和671321.1139385717
    30年後本利和819953.460175729
    40年後本利和1001493.4178216106
    50年後本利和1223226.8228065702
    60年後本利和1494052.6152314462

    500萬循環複利
    10年後本利和6107013.790800849
    20年後本利和7459123.488206352
    30年後本利和9110594.001952544
    40年後本利和1.112770464246234E7
    50年後本利和1.3591409142295225E7
    60年後本利和1.6600584613682736E7

    回覆刪除
  39. B10233074 許逸憲2014年6月10日 上午10:58

    public static void main(String[] args) {
    for (int i = 10; i <=60; i+=10) {
    double y =450000* Math.exp(i*0.02);
    System.out.println(i+"-->exp("+i+")="+y);
    }
    }
    }
    10-->exp(10)=549631.2411720764
    20-->exp(20)=671321.1139385717
    30-->exp(30)=819953.460175729
    40-->exp(40)=1001493.4178216106
    50-->exp(50)=1223226.8228065702
    60-->exp(60)=1494052.6152314462

    public static void main(String[] args) {
    for (int i = 10; i <=60; i+=10) {
    double y =5000000* Math.exp(i*0.02);
    System.out.println(i+"年後本利和"+y);
    }
    }
    }
    10年後本利和6107013.790800849
    20年後本利和7459123.488206352
    30年後本利和9110594.001952544
    40年後本利和1.112770464246234E7
    50年後本利和1.3591409142295225E7
    60年後本利和1.6600584613682736E7

    回覆刪除

HTML 編輯器