public static void main(String[] args) { double today = 900 * 10000d; double percent = 0.00008d; double cost = 2000; int day = 0; while (today > 0) { today = today + today * percent - cost; System.err.println("day:" + day + ":" + (int) today); day = day + 1; } System.err.println(day); }
你猜这个是干嘛的
最新推荐文章于 2024-11-11 21:19:25 发布