網頁

2016年3月8日 星期二

Ex1 連續複利

連續複利

59 則留言:

  1. import java.util.*;

    public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); import java.util.*;

    public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); int P=sc.nextInt(); double r=sc.nextDouble(); int t=sc.nextInt(); double A=P*Math.exp(r*t); System.out.println(A); }}
    int P=sc.nextInt(); double r=sc.nextDouble(); int t=sc.nextInt(); double A=P*Math.exp(r*t); System.out.println(A); }}

    回覆刪除
  2. import java.util.Scanner;

    public class ex3 {

    public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("本金:"); int P = sc.nextInt(); System.out.println("利息:"); double r = sc.nextDouble(); for(int t = 5; t<=40;t+=5){ double A=P*Math.exp(r*t); System.out.println(A); } }

    }
    本金:
    1000000
    利息:
    0.07
    1419067.5485932573
    2013752.7074704766
    2857651.118063164
    4055199.9668446756
    5754602.676005731
    8166169.912567652
    1.1588346719223391E7
    1.6444646771097055E7

    回覆刪除
  3. B10433009蔡佩樺2016年3月8日 下午3:49

    import java.util.*;
    public class ex03 {
    public static void main(String[]args){
    Scanner sc =new Scanner (System.in);
    System.out.print("本金:");
    int P=sc.nextInt();
    System.out.print("利息:");
    double r=sc.nextDouble();
    //int t=sc.nextInt();
    for(int i=5; i<=40;i+=5){
    double A=P*Math.exp(r*i);
    System.out.println(A); } }
    }

    回覆刪除
  4. B10433054孫若庭2016年3月8日 下午3:49

    import java.util.*;
    public class ex3 {
    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.print("本金:");
    int P=sc.nextInt();
    System.out.print("利息:");
    double r=sc.nextDouble();
    //int t=sc.nextInt();
    for(int i=5; i<=40; i+=5){
    double A=P*Math.exp(r*i);
    System.out.println(A); } }
    }

    回覆刪除
  5. b10433005沈沛姍2016年3月8日 下午3:50

    import java.util.*;
    public class ex3 {
    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.print("本金:");
    int P=sc.nextInt();
    System.out.print("利息:");
    double r=sc.nextDouble();
    //int t=sc.nextInt();
    for(int i=5; i<=40; i+=5){
    double A=P*Math.exp(r*i);
    System.out.println(A); } }
    }

    回覆刪除
  6. import java.util.Scanner;

    public class ex3 {

    public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("本金:"); int P = sc.nextInt(); System.out.println("利息:"); double r = sc.nextDouble(); for(int t = 5; t<=40;t+=5){ double A=P*Math.exp(r*t); System.out.println(t+"年利息:"+A); } }
    本金:
    1000000
    利息:
    0.07
    5年利息:1419067.5485932573
    10年利息:2013752.7074704766
    15年利息:2857651.118063164
    20年利息:4055199.9668446756
    25年利息:5754602.676005731
    30年利息:8166169.912567652
    35年利息:1.1588346719223391E7
    40年利息:1.6444646771097055E7

    回覆刪除
  7. B10433019李佳潔2016年3月8日 下午3:52

    import java.util.*;
    public class ex3
    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.print("本金:");
    int P=sc.nextInt();
    System.out.print("利息:");
    double r=sc.nextDouble();
    //int t=sc.nextInt();
    for(int i=5; i<=40; i+=5){
    double A=P*Math.exp(r*i);
    System.out.println(A); } }
    }

    回覆刪除
  8. import java.util.Scanner;

    public class ex3 {

    public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("本金:"); int P = sc.nextInt(); System.out.println("利息:"); double r = sc.nextDouble(); for(int t = 5; t<=40;t+=5){ double A=P*Math.exp(r*t); System.out.println(t+"年利息:"+Math.round(A)); } }}

    本金:
    1000000
    利息:
    0.07
    5年利息:1419068
    10年利息:2013753
    15年利息:2857651
    20年利息:4055200
    25年利息:5754603
    30年利息:8166170
    35年利息:11588347
    40年利息:16444647

    回覆刪除
  9. B10433009蔡佩樺2016年3月8日 下午4:00

    import java.util.*;
    public class ex03 {
    public static void main(String[]args){
    Scanner sc =new Scanner (System.in);
    System.out.print("本金:");
    int P=sc.nextInt();
    System.out.print("利息:");
    double r=sc.nextDouble();
    //int t=sc.nextInt();
    for(int i=5;=40;i+=5){
    double A=P*Math.exp(r*i);
    System.out.println(i+"年利息"+A); }
    }
    }
    本金:100000
    利息:0.07
    5年利息141906.75485932574
    10年利息201375.27074704767
    15年利息285765.11180631636
    20年利息405519.99668446754
    25年利息575460.2676005731
    30年利息816616.9912567652
    35年利息1158834.6719223391
    40年利息1644464.6771097055

    回覆刪除
  10. B10433026 陳元凱2016年3月8日 下午4:01

    import java.util.Scanner;

    public class ex3 {

    public static void main(String[] args) { Scanner input =new Scanner (System.in); System.out.println("本金"); int p=input.nextInt(); System.out.println("利息"); double r= input.nextDouble(); int t=0; for (int t1=0; t1<=40; t1+=5){ t1=input.nextInt(); double A=p*Math.exp(r*t1); System.out.println(A); } } }


    本金
    1000000
    利息
    0.07
    0年
    1000000.0
    5年
    1419067.5485932573
    10年
    2013752.7074704766
    15年
    2857651.118063164
    20年
    4055199.9668446756
    25年
    5754602.676005731
    30年
    8166169.912567652
    35年
    1.1588346719223391E7
    40年
    1.6444646771097055E7

    回覆刪除
  11. import java.util.*;public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金"); double A = 0; int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); for(int t=5;t<=40;t=t+5){ A=P*Math.exp(r*t); System.out.print(t+"年利息"+A+"\n"); } }}


    本金
    1000000
    利息
    0.07
    5年利息1419067.5485932573
    10年利息2013752.7074704766
    15年利息2857651.118063164
    20年利息4055199.9668446756
    25年利息5754602.676005731
    30年利息8166169.912567652
    35年利息1.1588346719223391E7

    回覆刪除
  12. import java.util.*;public class ex101 {



    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("錢"); int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); int t; for (t = 0; t <=40; t+=5) { double A = P * Math.exp(r * t); System.out.println(t+"利息"+A); } }

    }

    1000000
    利息
    0.07
    0利息1000000.0
    5利息1419067.5485932573
    10利息2013752.7074704766
    15利息2857651.118063164
    20利息4055199.9668446756
    25利息5754602.676005731
    30利息8166169.912567652
    35利息1.1588346719223391E7
    40利息1.6444646771097055E7

    回覆刪除
  13. import java.util.*;public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金"); double A = 0; int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); for(int t=5;t<=40;t=t+5){ A=P*Math.exp(r*t); System.out.print(t+"年利息"+A+"\n"); } }}



    本金1000000利息0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  14. import java.util.*;public class ex101 {



    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("錢"); int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); int t; for (t = 0; t <=40; t+=5) { double A = P * Math.exp(r * t); System.out.println(t+"利息"+A); } }

    }

    1000000
    利息
    0.07
    0利息1000000.0
    5利息1419067.5485932573
    10利息2013752.7074704766
    15利息2857651.118063164
    20利息4055199.9668446756
    25利息5754602.676005731
    30利息8166169.912567652
    35利息1.1588346719223391E7
    40利息1.6444646771097055E7

    回覆刪除
  15. B10433019李佳潔2016年3月8日 下午4:03

    import java.util.*;
    public class ex3 {
    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.print("本金:");
    int P=sc.nextInt();
    System.out.print("利息:");
    double r=sc.nextDouble();
    //int t=sc.nextInt();
    for(int i=5; i<=40; i+=5){
    double A=P*Math.exp(r*i);
    System.out.println(i+"年利息"+A); } }
    }

    本金:1000000
    利息:0.07
    5年利息1419067.5485932573
    10年利息2013752.7074704766
    15年利息2857651.118063164
    20年利息4055199.9668446756
    25年利息5754602.676005731
    30年利息8166169.912567652
    35年利息1.1588346719223391E7
    40年利息1.6444646771097055E7

    回覆刪除
  16. import java.util.*;public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金"); double A = 0; int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); for(int t=5;t<=40;t=t+5){ A=P*Math.exp(r*t); System.out.print(t+"年利息"+A+"\n"); } }}

    本金
    1000000
    利息
    0.07
    5年利息1419067.5485932573
    10年利息2013752.7074704766
    15年利息2857651.118063164
    20年利息4055199.9668446756
    25年利息5754602.676005731
    30年利息8166169.912567652
    35年利息1.1588346719223391E7

    回覆刪除
  17. import java.util.*;public class ex101 {



    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("錢"); int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); int t; for (t = 0; t <=40; t+=5) { double A = P * Math.exp(r * t); System.out.println(t+"利息"+A); } }

    }

    1000000
    利息
    0.07
    0利息1000000.0
    5利息1419067.5485932573
    10利息2013752.7074704766
    15利息2857651.118063164
    20利息4055199.9668446756
    25利息5754602.676005731
    30利息8166169.912567652
    35利息1.1588346719223391E7
    40利息1.6444646771097055E7

    回覆刪除
  18. import java.util.*;public class ex101 {



    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("錢"); int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); int t; for (t = 0; t <=40; t+=5) { double A = P * Math.exp(r * t); System.out.println(t+"利息"+A); } }

    }

    1000000
    利息
    0.07
    0利息1000000.0
    5利息1419067.5485932573
    10利息2013752.7074704766
    15利息2857651.118063164
    20利息4055199.9668446756
    25利息5754602.676005731
    30利息8166169.912567652
    35利息1.1588346719223391E7
    40利息1.6444646771097055E7

    回覆刪除
  19. import java.util.*;public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金"); double A = 0; int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); for(int t=5;t<=40;t=t+5){ A=P*Math.exp(r*t); System.out.print(t+"年利息"+A+"\n"); } }}



    本金1000000利息0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  20. import java.util.*;public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金"); double A = 0; int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); for(int t=5;t<=40;t=t+5){ A=P*Math.exp(r*t); System.out.print(t+"年利息"+A+"\n"); } }}



    本金1000000利息0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  21. B10233011 吳振誠2016年3月8日 下午4:06

    import java.util.*;public class ex2 {<br /> public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金"); double A = 0; int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); for(int t=5;t&lt;=40;t=t+5){ A=P*Math.exp(r*t); System.out.print(t+"年利息"+A+"\n"); } }}<br /> <br /> 本金1000000利息0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7<br />

    回覆刪除
  22. B10233035鄭智翔2016年3月8日 下午4:06

    import java.util.*;public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金"); double A = 0; int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); for(int t=5;t<=40;t=t+5){ A=P*Math.exp(r*t); System.out.print(t+"年利息"+A+"\n"); } }}

    本金
    1000000
    利息
    0.07
    5年利息1419067.5485932573
    10年利息2013752.7074704766
    15年利息2857651.118063164
    20年利息4055199.9668446756
    25年利息5754602.676005731
    30年利息8166169.912567652
    35年利息1.1588346719223391E7

    回覆刪除
  23. B10433022 吳欣芸2016年3月8日 下午4:06

    import java.util.Scanner;

    public class ex3 { public static void main(String[] args) {

    Scanner sc=new Scanner(System.in); System.out.print("本金:"); int P=sc.nextInt(); System.out.print("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int t=5;t<=40;t+=5){ double A=P*Math.exp(r*t); System.out.println(t+"年利息"+A); } } }

    回覆刪除
  24. package ex3;

    import java.util.Scanner;

    public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本錢"); int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); //int t=sc.nextInt(); for (int i=5; i<=40; i+=5){ double A=P*Math.exp(r*i); System.out.println(i+"年"+A); } }

    }

    本錢
    100000000
    利息
    0.8
    5年5.459815003314424E9
    10年2.9809579870417285E11
    15年1.627547914190039E13
    20年8.886110520507872E14
    25年4.8516519540979024E16
    30年2.6489122129843471E18
    35年1.4462570642914751E20
    40年7.896296018268069E21

    回覆刪除
  25. import java.util.*;public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金"); double A = 0; int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); for(int t=5;t<=40;t=t+5){ A=P*Math.exp(r*t); System.out.print(t+"年利息"+A+"\n"); } }}

    本金
    1000000
    利息
    0.07
    5年利息1419067.5485932573
    10年利息2013752.7074704766
    15年利息2857651.118063164
    20年利息4055199.9668446756
    25年利息5754602.676005731
    30年利息8166169.912567652
    35年利息1.1588346719223391E7

    回覆刪除
  26. B10433053謝肇安2016年3月8日 下午4:08

    import java.util.Scanner;

    public class ex03 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金:"); int P=sc.nextInt(); System.out.println("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int i=5; i<=40; i=i+5){ double A=P*Math.exp(r*i); System.out.println("第"+i+"年"+A); } }

    }

    本金:1000000利息:0.07第5年1419067.5485932573第10年2013752.7074704766第15年2857651.118063164第20年4055199.9668446756第25年5754602.676005731第30年8166169.912567652第35年1.1588346719223391E7第40年1.6444646771097055E7

    回覆刪除
  27. B10433031陳頌恩2016年3月8日 下午4:08

    import java.util.Scanner;

    public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本錢:"); int P=sc.nextInt(); System.out.println("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int i=5; i<=40; i+=5){ double A=P*Math.exp(r*i); System.out.println(i+"年"+A); } }

    }

    本錢:1000000利息:0.075年1419067.548593257310年2013752.707470476615年2857651.11806316420年4055199.966844675625年5754602.67600573130年8166169.91256765235年1.1588346719223391E740年1.6444646771097055E7

    回覆刪除
  28. B10433008王靖雲2016年3月8日 下午4:09

    import java.util.*;

    public class EX1

    public static void main(String[] args) {

    Scanner sc=new Scanner(System.in);

    System.out.println("本金:");

    int P=sc.nextInt();

    System.out.println("利息:");

    double r=sc.nextDouble();

    //int t=sc.nextInt();

    for(int t=5; t<=40 ; t+=5){

    double A=P*Math.exp(r*t);

    System.out.println("第"+t+"年利息:"+A);

    }

    }

    }

    本金: 1000000 利息: 0.07 第5年利息:1419067.5485932573 第10年利息:2013752.7074704766 第15年利息:2857651.118063164 第20年利息:4055199.9668446756 第25年利息:5754602.676005731 第30年利息:8166169.912567652 第35年利息:1.1588346719223391E7 第40年利息:1.6444646771097055E7

    回覆刪除
  29. B10433018張易儒2016年3月8日 下午4:09

    import java.util.Scanner;

    public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本錢:"); int P=sc.nextInt(); System.out.println("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int i=5; i<=40; i+=5){ double A=P*Math.exp(r*i); System.out.println(i+"年"+A); } }

    }

    本錢:1000000利息:0.075年1419067.548593257310年2013752.707470476615年2857651.11806316420年4055199.966844675625年5754602.67600573130年8166169.91256765235年1.1588346719223391E740年1.6444646771097055E7

    回覆刪除
  30. B10433068丁麗敏2016年3月8日 下午4:09

    import java.util.Scanner;

    public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金:"); int P=sc.nextInt(); System.out.println("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int t=5; t<=40 ; t+=5){ double A=P*Math.exp(r*t); System.out.println("第"+t+"年利息"+A); }}}




    本金:1000000


    利息:0.07


    第5年利息1419067.5485932573第10年利息2013752.7074704766第15年利息2857651.118063164第20年利息4055199.9668446756第25年利息5754602.676005731第30年利息8166169.912567652第35年利息1.1588346719223391E7第40年利息1.6444646771097055E7

    回覆刪除
  31. B10433010吳奇峰2016年3月8日 下午4:13

    import java.util.*; public class ex03 { public static void main(String[]args){ Scanner sc =new Scanner (System.in); System.out.print("本金:"); int P=sc.nextInt(); System.out.print("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int i=5; i<=40;i+=5){ double A=P*Math.exp(r*i); System.out.println(i+"年利息"+A); } } }



    本金:1000000 利息:0.07 5年利息1419067.5485932573 10年利息2013752.7074704766 15年利息2857651.118063164 20年利息4055199.9668446756 25年利息5754602.676005731 30年利息8166169.912567652 35年利息1.1588346719223391E7 40年利息1.6444646771097055E7

    回覆刪除
  32. import java.util.*;



    public class EX1 {



    public static void main(String[] args) {

    Scanner sc=new Scanner(System.in);

    System.out.println("本金:");

    int P=sc.nextInt();

    System.out.println("利息:");

    double r=sc.nextDouble();

    //int t=sc.nextInt();

    for(int t=5; t<=40 ; t+=5){

    double A=P*Math.exp(r*t);

    System.out.println("第"+t+"年利息:"+A);

    }

    }

    }


    本金:1000000利息:0.07第5年利息:1419067.5485932573第10年利息:2013752.7074704766第15年利息:2857651.118063164第20年利息:4055199.9668446756第25年利息:5754602.676005731第30年利息:8166169.912567652第35年利息:1.1588346719223391E7第40年利息:1.6444646771097055E7 }

    回覆刪除
  33. B10433012鍾仁凱2016年3月8日 下午4:14

    import java.util.Scanner;

    public class ex3 { public static void main(String[]args){ Scanner sc =new Scanner (System.in); System.out.print("本金:"); int P=sc.nextInt(); System.out.print("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int i=5; i<=40;i+=5){ double A=P*Math.exp(r*i); System.out.println(i+"年利息"+A); } }

    }

    本金:1000000利息:0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  34. B10433008王靖雲2016年3月8日 下午4:15

    import java.util.*;



    public class EX1 {



    public static void main(String[] args) {

    Scanner sc=new Scanner(System.in);

    System.out.println("本金:");

    int P=sc.nextInt();

    System.out.println("利息:");

    double r=sc.nextDouble();

    //int t=sc.nextInt();

    for(int t=5; t<=40 ; t+=5){

    double A=P*Math.exp(r*t);

    System.out.println("第"+t+"年利息:"+A);

    }

    }

    }


    本金:1000000利息:0.07第5年利息:1419067.5485932573第10年利息:2013752.7074704766第15年利息:2857651.118063164第20年利息:4055199.9668446756第25年利息:5754602.676005731第30年利息:8166169.912567652第35年利息:1.1588346719223391E7第40年利息:1.6444646771097055E7 }

    回覆刪除
  35. import java.util.*; public class ex3 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金"); int p=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); int t=0; for (int t1=0; t1<=40; t1+=5){ double A=p*Math.exp(r*t1); System.out.println(A); } } }
    本金
    1000000
    利息
    0.07
    1000000.0
    1419067.5485932573
    2013752.7074704766
    2857651.118063164
    4055199.9668446756
    5754602.676005731
    8166169.912567652
    1.1588346719223391E7
    1.6444646771097055E7

    回覆刪除
  36. B10433027吳俊章2016年3月8日 下午4:15

    import java.util.Scanner;

    public class ex3 {

    public static void main(String[] args) { Scanner sc= new Scanner(System.in); System.out.println("本金"); int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); int t=0; for(int t1=0; t1<=40; t1+=5){ double A=P*Math.exp(r*t1); System.out.println(t1+"年的本利和"); System.out.println(A); } }}

    本金
    1000000
    利息
    0.07
    0年的本利和
    1000000.0
    5年的本利和
    1419067.5485932573
    10年的本利和
    2013752.7074704766
    15年的本利和
    2857651.118063164
    20年的本利和
    4055199.9668446756
    25年的本利和
    5754602.676005731
    30年的本利和
    8166169.912567652
    35年的本利和
    1.1588346719223391E7
    40年的本利和
    1.6444646771097055E7

    回覆刪除
  37. import java.util.*; public class ex3 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金"); int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); int t=0; for(int t1=0;t1<=40;t1+=5){ double A=P*Math.exp(r*t1); System.out.println(A); } } }

    本金
    1000000
    利息
    0.07
    1000000.0
    1419067.5485932573
    2013752.7074704766
    2857651.118063164
    4055199.9668446756
    5754602.676005731
    8166169.912567652
    1.1588346719223391E7
    1.6444646771097055E7

    回覆刪除
  38. B10433049宋子文2016年3月8日 下午4:20

    import java.util.Scanner;

    public class ex03 { public static void main(String[]args){ Scanner sc =new Scanner (System.in); System.out.print("本金:"); int P=sc.nextInt(); System.out.print("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int i=5; i<=40;i+=5){ double A=P*Math.exp(r*i); System.out.println(i+"年利息"+A); } }

    }



    本金:1000000利息:0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  39. B10433049宋子文2016年3月8日 下午4:21

    import java.util.Scanner;

    public class ex03 { public static void main(String[]args){ Scanner sc =new Scanner (System.in); System.out.print("本金:"); int P=sc.nextInt(); System.out.print("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int i=5; i<=40;i+=5){ double A=P*Math.exp(r*i); System.out.println(i+"年利息"+A); } }

    }



    本金:1000000利息:0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  40. B10433068丁麗敏2016年3月8日 下午4:22

    import java.util.Scanner;

    public class ex3 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金:"); int P=sc.nextInt(); System.out.println("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int t=5; t<=40 ; t+=5){ double A=P*Math.exp(r*t); System.out.println("第"+t+"年利息"+A); }}}



    本金:1000000
    利息:0.07
    第5年利息1419067.5485932573第10年利息2013752.7074704766第15年利息2857651.118063164第20年利息4055199.9668446756第25年利息5754602.676005731第30年利息8166169.912567652第35年利息1.1588346719223391E7第40年利息1.6444646771097055E7

    回覆刪除
  41. B10433021呂志信2016年3月8日 下午4:22

    package hello1;

    import java.util.*;
    public class hello1{

    public static void main(String[]args){
    Scanner sc =new Scanner (System.in);
    System.out.print("本金:");
    int P=sc.nextInt();
    System.out.print("利息:");
    double r=sc.nextDouble();
    //int t=sc.nextInt();
    for(int i=5; i<=40;i+=5){
    double A=P*Math.exp(r*i);
    A=Math.round(A);
    System.out.println(i+"年利息"+A);
    }
    }
    }


    本金:1000000
    利息:0.07
    5年利息1419068.0
    10年利息2013753.0
    15年利息2857651.0
    20年利息4055200.0
    25年利息5754603.0
    30年利息8166170.0
    35年利息1.1588347E7
    40年利息1.6444647E7

    回覆刪除
  42. B10433020沈柏軍2016年3月8日 下午4:23

    import java.util.Scanner; public class ex1 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.print("本金"); int P=sc.nextInt(); System.out.print("利息"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int t=5;t<=40;t+=5){ double A=P*Math.exp(r*t); System.out.println("第"+t+"年利息"+A); } } }

    本金1000000利息0.07第5年利息1419067.5485932573第10年利息2013752.7074704766第15年利息2857651.118063164第20年利息4055199.9668446756第25年利息5754602.676005731第30年利息8166169.912567652第35年利息1.1588346719223391E7第40年利息1.6444646771097055E7

    回覆刪除
  43. B10433029 宋狄淯2016年3月8日 下午4:23

    import java.util.Scanner;

    public class ex3 { public static void main(String[]args){ Scanner sc =new Scanner (System.in); System.out.print("本金:"); int P=sc.nextInt(); System.out.print("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int i=5; i<=40;i+=5){ double A=P*Math.exp(r*i); System.out.println(i+"年利息"+A); } }

    }

    本金:1000000利息:0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  44. B10433030 楊家睿2016年3月8日 下午4:23

    import java.util.Scanner;

    public class ex3 { public static void main(String[]args){ Scanner sc =new Scanner (System.in); System.out.print("本金:"); int P=sc.nextInt(); System.out.print("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int i=5; i<=40;i+=5){ double A=P*Math.exp(r*i); System.out.println(i+"年利息"+A); } }

    }

    本金:1000000利息:0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  45. B10433028陳佳勳2016年3月8日 下午4:24

    import java.util.Scanner;

    public class ex3 { public static void main(String[]args){ Scanner sc =new Scanner (System.in); System.out.print("本金:"); int P=sc.nextInt(); System.out.print("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int i=5; i<=40;i+=5){ double A=P*Math.exp(r*i); System.out.println(i+"年利息"+A); } }

    }

    本金:1000000利息:0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  46. B10433023李佳明2016年3月8日 下午4:25

    import java.util.Scanner;

    public class EXP {

    public static void main(String[] args) { // 連續複利 Scanner sc=new Scanner(System.in); System.out.print("金額"); int P=sc.nextInt(); System.out.print("利息"); double r=sc.nextDouble(); for(int t=0;t<=40;t+=5){ System.out.println(t); System.out.print("年"); double A=P*Math.exp(r*t); System.out.println(Math.round(A)); }

    }

    }


    金額1000000
    利息0.07
    0年1000000
    5年1419068
    10年2013753
    15年2857651
    20年4055200
    25年5754603
    30年8166170
    35年11588347
    40年16444647

    回覆刪除
  47. B10433007張聖鑫2016年3月8日 下午4:25

    import java.util.Scanner;

    public class Hello38 {

    public static void main(String[] arge) { Scanner sc=new Scanner(System.in); System.out.print("本金"); int P=sc.nextInt(); System.out.print("利息"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int t=5;t<=40;t+=5){ double A=P*Math.exp(r*t); System.out.println("第"+t+"年利息"+A); }}}

    本金1000000利息0.07第5年利息1419067.5485932573第10年利息2013752.7074704766第15年利息2857651.118063164第20年利息4055199.9668446756第25年利息5754602.676005731第30年利息8166169.912567652第35年利息1.1588346719223391E7第40年利息1.6444646771097055E7

    回覆刪除
  48. B10433044吳玉瀚2016年3月8日 下午4:26

    import java.util.Scanner;

    public class a03 {

    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.print("本金");
    int P=sc.nextInt();
    System.out.print("利息");
    double R=sc.nextDouble();
    System.out.print("本利和\r");
    for(int T=5;T<=40;T+=5)
    { System.out.print(T);System.out.print("年\r");
    double A=P*Math.exp(R*T);
    System.out.print(Math.round(A));System.out.print("\r"); }
    }
    }
    本金1000000
    利息0.07
    本利和
    5年
    1419068
    10年
    2013753
    15年
    2857651
    20年
    4055200
    25年
    5754603
    30年
    8166170
    35年
    11588347
    40年
    16444647

    回覆刪除
  49. B10433022 吳欣芸2016年3月8日 下午4:26

    import java.util.Scanner;

    public class ex3 { public static void main(String[] args) {

    Scanner sc=new Scanner(System.in); System.out.print("本金:"); int P=sc.nextInt(); System.out.print("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int t=5;t<=40;t+=5){ double A=P*Math.exp(r*t); System.out.println(t+"年利息"+A); } } }


    本金:1000000利息:0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  50. B10433022 吳欣芸2016年3月8日 下午4:26

    import java.util.Scanner;

    public class ex3 { public static void main(String[] args) {

    Scanner sc=new Scanner(System.in); System.out.print("本金:"); int P=sc.nextInt(); System.out.print("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int t=5;t<=40;t+=5){ double A=P*Math.exp(r*t); System.out.println(t+"年利息"+A); } } }


    本金:1000000利息:0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  51. B10433014楊偉杰2016年3月8日 下午4:27

    import java.util.Scanner;

    public class ex8732 {

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("本金"); int P=sc.nextInt(); System.out.println("利息"); double r=sc.nextDouble(); for(int t=0;t<=40;t+=5){ System.out.println(t); double A=P*Math.exp(r*t); System.out.println("年"); System.out.println(Math.round(A)); } }}

    本金 1000000 利息 0.07 0 年 1000000 5 年 1419068 10 年 2013753 15 年 2857651 20 年 4055200 25 年 5754603 30 年 8166170 35 年 11588347 40 年 16444647

    回覆刪除
  52. B10433015周采萱2016年3月8日 下午4:27

    import java.util.Scanner;

    public class ex3 {

    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.print("本金:");
    int P=sc.nextInt();
    System.out.print("利息:");
    double r=sc.nextDouble();
    for(int t=5; t<=40; t=t+5){
    //int t=sc.nextInt();
    double A=P*Math.exp(r*t);
    System.out.println(t+"年利息"+A);
    }
    }
    }

    回覆刪除
  53. B10433006張正祺2016年3月8日 下午4:28

    import java.util.*;

    public class ex{

    public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.print("本金"); int P=sc.nextInt(); System.out.print("利息"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int t=5;t<=40;t+=5){ double A=P*Math.exp(r*t); System.out.println("第"+t+"年利息"+A); } }

    }

    本金1000000 利息0.07 第5年利息1419067.5485932573 第10年利息2013752.7074704766 第15年利息2857651.118063164 第20年利息4055199.9668446756 第25年利息5754602.676005731 第30年利息8166169.912567652 第35年利息1.1588346719223391E7 第40年利息1.6444646771097055E7

    回覆刪除
  54. B10433034陳智揚2016年3月8日 下午4:28

    import java.util.*;

    public class ex3 {

    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.println("本金");
    int P=sc.nextInt();
    System.out.println("利息");
    double r=sc.nextDouble();
    for (int t = 0; t <=40; t+=5) {
    double A=P*Math.exp(r*t);
    A=Math.round(A);
    System.out.println(t+"年利息"+A);




    }

    }
    }

    回覆刪除
  55. B10433051莊孟軒2016年3月8日 下午4:30

    import java.util.Scanner;

    public class ex3 { public static void main(String[] args) {

    Scanner sc=new Scanner(System.in); System.out.print("本金:"); int P=sc.nextInt(); System.out.print("利息:"); double r=sc.nextDouble(); //int t=sc.nextInt(); for(int t=5;t<=40;t+=5){ double A=P*Math.exp(r*t); System.out.println(t+"年利息"+A); } } }


    本金:1000000利息:0.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7

    回覆刪除
  56. B10433034陳智揚2016年3月8日 下午4:30

    import java.util.*;

    public class ex3 {

    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.println("本金");
    int P=sc.nextInt();
    System.out.println("利息");
    double r=sc.nextDouble();
    for (int t = 0; t <=40; t+=5) {
    double A=P*Math.exp(r*t);
    A=Math.round(A);
    System.out.println(t+"年利息"+A);




    }

    }
    }

    回覆刪除
  57. B10433046陳文耀2016年3月8日 下午4:44

    import java.util.*;

    public class ex3 {

    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.println("本金");
    int P=sc.nextInt();
    System.out.println("利息");
    double r=sc.nextDouble();
    for (int t = 0; t <=40; t+=5) {
    double A=P*Math.exp(r*t);
    A=Math.round(A);
    System.out.println(t+"年利息"+A);




    }

    }
    }

    回覆刪除
  58. B10433040葉峻宇2016年3月15日 下午1:55

    import java.util.*;

    public class ex3 {

    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.println("本金");
    int P=sc.nextInt();
    System.out.println("利息");
    double r=sc.nextDouble();
    for (int t = 0; t <=40; t+=5) {
    double A=P*Math.exp(r*t);
    A=Math.round(A);
    System.out.println(t+"年利息"+A);




    }

    }
    }

    回覆刪除
  59. B10433039游叡恩2016年3月15日 下午2:18

    import java.util.*;

    public class ex3 {

    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    System.out.println("本金");
    int P=sc.nextInt();
    System.out.println("利息");
    double r=sc.nextDouble();
    for (int t = 0; t <=40; t+=5) {
    double A=P*Math.exp(r*t);
    A=Math.round(A);
    System.out.println(t+"年利息"+A);




    }

    }
    }

    回覆刪除

HTML 編輯器