這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
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); }}
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.071419067.54859325732013752.70747047662857651.1180631644055199.96684467565754602.6760057318166169.9125676521.1588346719223391E71.6444646771097055E7
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); } }}
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); } }}
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); } }}
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.075年利息:1419067.548593257310年利息:2013752.707470476615年利息:2857651.11806316420年利息:4055199.966844675625年利息:5754602.67600573130年利息:8166169.91256765235年利息:1.1588346719223391E740年利息:1.6444646771097055E7
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); } }}
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.075年利息:141906810年利息:201375315年利息:285765120年利息:405520025年利息:575460330年利息:816617035年利息:1158834740年利息:16444647
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.075年利息141906.7548593257410年利息201375.2707470476715年利息285765.1118063163620年利息405519.9966844675425年利息575460.267600573130年利息816616.991256765235年利息1158834.671922339140年利息1644464.6771097055
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.070年1000000.05年1419067.548593257310年2013752.707470476615年2857651.11806316420年4055199.966844675625年5754602.67600573130年8166169.91256765235年1.1588346719223391E740年1.6444646771097055E7
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.1588346719223391E7
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.070利息1000000.05利息1419067.548593257310利息2013752.707470476615利息2857651.11806316420利息4055199.966844675625利息5754602.67600573130利息8166169.91256765235利息1.1588346719223391E740利息1.6444646771097055E7
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
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.075年利息1419067.548593257310年利息2013752.707470476615年利息2857651.11806316420年利息4055199.966844675625年利息5754602.67600573130年利息8166169.91256765235年利息1.1588346719223391E740年利息1.6444646771097055E7
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<=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 />
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); } } }
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.85年5.459815003314424E910年2.9809579870417285E1115年1.627547914190039E1320年8.886110520507872E1425年4.8516519540979024E1630年2.6489122129843471E1835年1.4462570642914751E2040年7.896296018268069E21
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
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
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
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
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
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 }
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
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.071000000.01419067.54859325732013752.70747047662857651.1180631644055199.96684467565754602.6760057318166169.9125676521.1588346719223391E71.6444646771097055E7
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.070年的本利和1000000.05年的本利和1419067.548593257310年的本利和2013752.707470476615年的本利和2857651.11806316420年的本利和4055199.966844675625年的本利和5754602.67600573130年的本利和8166169.91256765235年的本利和1.1588346719223391E740年的本利和1.6444646771097055E7
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.071000000.01419067.54859325732013752.70747047662857651.1180631644055199.96684467565754602.6760057318166169.9125676521.1588346719223391E71.6444646771097055E7
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
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.075年利息1419068.010年利息2013753.015年利息2857651.020年利息4055200.025年利息5754603.030年利息8166170.035年利息1.1588347E740年利息1.6444647E7
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
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.070年10000005年141906810年201375315年285765120年405520025年575460330年816617035年1158834740年16444647
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
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年141906810年201375315年285765120年405520025年575460330年816617035年1158834740年16444647
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
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
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); } }}
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
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 編輯器
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); }}
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
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); } }
}
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); } }
}
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); } }
}
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
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); } }
}
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
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
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
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
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
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
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
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
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
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
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
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
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
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<=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 />
回覆刪除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
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); } } }
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
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
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
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
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
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
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
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
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 }
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
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 }
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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);
}
}
}
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
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);
}
}
}
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
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);
}
}
}
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);
}
}
}
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);
}
}
}
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);
}
}
}