?? buyhouse.java
字號:
/*
*while循環(huán)控制結(jié)構(gòu)的測試
*/
public class BuyHouse
{
public static void main(String[] args)
{
final double HOUSEFUND = 200000;
double salary = 2000;
double fund = 0;
int years = 1;
while (fund < HOUSEFUND)
{
fund += salary*0.05*12;
years++;
salary = salary * 1.1;
}
System.out.println("the total years is: " + years);
System.out.println("the total fund is : " + fund);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -