Compound Interest

Run Settings
LanguageJava
Language Version
Run Command
class Main { public static void main(String[] args) { double CD = 700, rate = 10, years = 50, CI = 700; for(int i = 1; CI<=4000; i++){ System.out.println("Year " + i + ": $" + CI ); CI += (CD * (rate / 100)); } //System.out.println("Compound Interest is "+ CI); System.out.println("It would take" + years); } }
Editor Settings
Theme
Key bindings
Full width
Lines