?? examp3_4.java
字號:
import java.text.*;
public class Examp3_4 {
public static void main(String[] args){
double original,money,interest;
int years = 0;
original = money= 10000;
interest = 11.25 / 100;
System.out.println("year money");
while (money < 2 * original) {
years = years + 1;
money = money + (interest * money);
System.out.println(" " + years + " " +
new DecimalFormat("0.00").format(money));
}
System.out.println();
System.out.println(" 第 " + years + " 年存款額達到 " +
new DecimalFormat("0.00").format(money) + "元。");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -